var UI_ROOT = cc.find(“UI_ROOT”);
UI_ROOT.on(cc.Event.EventMouse, function (event) {
console.log(’#####’);
}, this);
这样 完全没反应啊
官方 API 也是说的很简短,看了完全懵逼,没有相关资料啊
http://www.cocos.com/docs/creator/scripting/internal-events.html
鼠标事件(cc.Event.EventMouse)的重要 API 如下
就完了
能不能来个 范例啊?
就像上面 那样
// 使用枚举类型来注册
node.on(cc.Node.EventType.MOUSE_DOWN, function (event) {
console.log(‘Mouse down’);
}, this);
// 使用事件名来注册
node.on(‘mousedown’, function (event) {
console.log(‘Mouse down’);
}, this)
这个 cc.Event.EventMouse 看得我是脸懵逼


,


