void OnDestroy() { // 注销事件 EventMachine.Unregister(EventID.Event_UI_Create, OnCreateUI); EventMachine.Unregister(EventID.Event_UI_Delete, OnDeleteUI); EventMachine.Unregister(EventID.Event_UI_DeleteAll, OnDeleteAllUI); }
public override void End() { // 移除一个UI EventMachine.SendEvent(EventID.Event_UI_Delete, UIType.UIPlay); // 注销事件 EventMachine.Unregister(EventID.Event_UI_Play_Back, OnPlayBack); // ... }
public override void End() { // 移除一个UI EventMachine.SendEvent(EventID.Event_UI_Delete, UIType.UIMenu); EventMachine.SendEvent(EventID.Event_UI_Create, UIType.UILoading); // 注销监听函数 EventMachine.Unregister(EventID.Event_UI_Menu_Play, OnPlay); EventMachine.Unregister(EventID.Event_UI_Menu_TwoPlay, OnTwoPlay); EventMachine.Unregister(EventID.Event_UI_Menu_Multiplayer, OnMultiplayer); }
void OnDestroy() { EventMachine.Unregister(EventID.Event_Loading, OnLoadingProgress); }
void OnDestroy() { EventMachine.Unregister(EventID.Event_Effect_CameraVibration, OnCameraVibration); EventMachine.Unregister(EventID.Event_Effect_CameraAnimation, OnCameraAnimation); }