Пример #1
0
 protected override void Awake()
 {
     base.Awake();
     Facade.AddMonoListener(LateUpdateCamera, UpdateType.LateUpdate, out lateUpdateID);
     Facade.AddEventListener(ControllerEventCodeParams.CONTROLLER_INPUT, CameraHandler);
     Facade.RegisterController(this);
 }
Пример #2
0
 /// <summary>
 /// 注册事件,默认将EventHandler注册到事件中心
 /// 如果需要注册其他事件,则移步AddEventListener
 /// </summary>
 protected void AddDefaultEventListener(string eventKey)
 {
     Facade.AddEventListener(eventKey, EventHandler);
 }
Пример #3
0
 protected void AddEventListener(string eventKey, Action <object, GameEventArgs> handler)
 {
     Facade.AddEventListener(eventKey, handler);
 }
Пример #4
0
 public void Register()
 {
     Facade.AddEventListener(EventKey, Handler);
 }