cc.Class({ extends: cc.Component, properties: { imgOn:{ default:null, type:cc.SpriteFrame }, imgOff:{ default: null, type: cc.SpriteFrame }, // mbool:true }, // mbtn(mbool){ // let sprite = this.node.getComponent(cc.Sprite) // console.log(sprite.name) // // this.mbool = !this.mbool; // if (mbool){ // sprite.spriteFrame = this.imgOn // }else { // sprite.spriteFrame = this.imgOff // } // }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start () { }, // update (dt) {}, });