父节点移动1秒,子节点0.5秒fadeOut,重新把子节点fadeIn出来,位置停留在消失的地方。
active = false; active = true;后,会跳到应该在的位置。
代码
/**
- 测试
*/
cc.Class({
extends: cc.Component,
properties: { turtleNode: cc.Node },
// LIFE-CYCLE CALLBACKS:
onLoad() { this.turtleNode.runAction(cc.fadeOut(0.5)); this.node.x = 500; this.node.runAction(cc.moveTo(1, cc.v2(0, 0))); },
btnFadeInClick() { this.turtleNode.runAction(cc.fadeIn(0.1)); },
btnReActiveClick() { this.turtleNode.active = false; this.turtleNode.active = true; }});

