private void UnsubscribeAllCloseEvents() { foreach (var e in closeEvents) { EventManager_Window.Unsubscribe(e, Close_Handler); EventManager_Gameplay.Unsubscribe(e, Close_Handler); EventManager.Unsubscribe(e, Close_Handler); } }
protected virtual void UnsubscribeStart(string type) { if (useEventManager) { EventManager.Unsubscribe(type, Handler_StartAudioEvent); } if (useAudioEventManager) { EventManager_Audio.Unsubscribe(type, Handler_StartAudioEvent); } if (useInputEventManager) { EventManager_Input.Unsubscribe(type, Handler_StartAudioEvent); } if (useWindowEventManager) { EventManager_Window.Unsubscribe(type, Handler_StartAudioEvent); } if (useGameplayEventManager) { EventManager_Gameplay.Unsubscribe(type, Handler_StartAudioEvent); } }
protected virtual void SubscribeStop(string type) { if (useEventManager) { EventManager.Subscribe(type, Handler_StopAudioEvent); } if (useAudioEventManager) { EventManager_Audio.Subscribe(type, Handler_StopAudioEvent); } if (useInputEventManager) { EventManager_Input.Subscribe(type, Handler_StopAudioEvent); } if (useWindowEventManager) { EventManager_Window.Subscribe(type, Handler_StopAudioEvent); } if (useGameplayEventManager) { EventManager_Gameplay.Subscribe(type, Handler_StopAudioEvent); } }
public void OpenWindow(UIWindow window, object sender) { EventManager_Window.Notify(sender, new GameEventArgs(EventManager_Window.OPEN_WINDOW, window.ID)); }
public void OpenWindow(UIWindow window) { EventManager_Window.Notify(this, new GameEventArgs(EventManager_Window.OPEN_WINDOW, window.ID)); }
public void OpenWindow(string windowID) { EventManager_Window.Notify(this, new GameEventArgs(EventManager_Window.OPEN_WINDOW, windowID)); }
protected override void OnDestroy() { EventManager_Window.Unsubscribe(EventManager_Window.WINDOW_OPENED, Handler_WindowOpened); EventManager_Window.Unsubscribe(EventManager_Window.WINDOW_CLOSED, Handler_WindowClosed); base.OnDestroy(); }
private void Start() { EventManager_Window.Subscribe(EventManager_Window.WINDOW_OPENED, Handler_WindowOpened); EventManager_Window.Subscribe(EventManager_Window.WINDOW_CLOSED, Handler_WindowClosed); }
public void CloseWindow(UIWindow window) { EventManager_Window.Notify(this, new GameEventArgs(EventManager_Window.CLOSE_WINDOW, window.ID)); }