1. 回调函数里如果需要传递this,用bind;call会立即调用函数,而不是等待回调。
2.button的点击事件
var clickEventHandler = new cc.Component.EventHandler();
clickEventHandler.target = this.node; // 这个 node 节点是你的事件处理代码组件所属的节点
3.node.stopAllActions(), 只会停止当前节点的action,不会递归子节点。
1. 回调函数里如果需要传递this,用bind;call会立即调用函数,而不是等待回调。
2.button的点击事件
var clickEventHandler = new cc.Component.EventHandler();
clickEventHandler.target = this.node; // 这个 node 节点是你的事件处理代码组件所属的节点
3.node.stopAllActions(), 只会停止当前节点的action,不会递归子节点。