1 cc.Class({ 2 extends: cc.Component, 3 4 properties: { 5 6 }, 7 8 // LIFE-CYCLE CALLBACKS: 9 10 onLoad () { 11 this.node.on(cc.Node.EventType.TOUCH_START, function(e) { 12 var finished = cc.callFunc(function () { 13 console.log("我的图片已经隐藏了!================== "); 14 }, this); 15 16 // 当图片只有一个渐隐效果要处理,并无其他要执行的动作,不能用cc.sequence 17 18 var myAction = //cc.sequence( 19 cc.spawn( 20 cc.fadeOut(1) // 1 表示执行渐隐效果所需要的时间,1秒 21 , finished)//); 22 this.node.runAction(myAction); 23 }.bind(this), this); 24 }, 25 26 start () { 27 28 }, 29 30 // update (dt) {}, 31 });