监听事件
this.node.on(要监听的事件,function(event){
事件函数
});
鼠标监听实例:
this.node.on(cc.Node.EventType.MOUSE_DOWN,function(event){
console.debug("输出内容"+event.getLocation())
});
this.node.on(cc.Node.EventType.MOUSE_DOWN,function(event){
console.debug("输出内容"+event.getLocation())
});