// how to pass data distributed event

// how to distribute the event data transfer 
cc.eventManager.dispatchCustomEvent ( 'eventName', UserData);
cc.eventManager.addListener ({
Event: cc.EventListener.CUSTOM,
eventName: 'eventName',
the callback: function (Event) {
the let = event.getUserData the userData ();
} .bind (the this)
}, the this);

Guess you like

Origin www.cnblogs.com/guomengkai/p/12327400.html