添加一个简单的新手引导时,只能点击某个区域

This commit is contained in:
leo
2018-11-27 11:15:16 +08:00
parent 26f9a9ccb4
commit 4919101b09
23 changed files with 21900 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
cc.Class({
extends: cc.Component,
properties: {
label: {
default: null,
type: cc.Label
},
// defaults, set visually when attaching this script to the Canvas
text: 'Hello, World!'
},
// use this for initialization
onLoad: function () {
this.label.string = this.text;
},
onEventClicked_can() {
console.log('onEventClicked_can');
},
onEventClicked_no() {
console.log('onEventClicked_no');
},
// called every frame
update: function (dt) {
},
});