[]EventDispatcher接收不到参数


var Dispatcher = (function(_super){
function Dispatcher(){
Dispatcher.super(this);
};
//注册类
Laya.class(Dispatcher,"Dispatcher",_super);
//实例EventDispatcher类
Dispatcher.eventDispatcher = new Laya.EventDispatcher();
//发送事件
Dispatcher.Emit = function(InName,agv){
//派发事件
console.log("agv-->"+agv);
Dispatcher.eventDispatcher.event(InName,agv);
}
//侦听事件
Dispatcher.AddNotice = function(InName,caller,listener,arg){
//监听事件
Dispatcher.eventDispatcher.on(InName,caller,listener,(arg==null)?null:([arg]));
console.log("arg-->"+[arg]);
}
return Dispatcher;
})(Laya.EventDispatcher);
 
EventDispatcher接收不到参数    派发事件输出正常   监听事件输出是为空
已邀请:

Monica - 知识达人

赞同来自:

可以先看下这个帖子自定义派发事件
有问题再联系!

要回复问题请先

商务合作
商务合作