/// <summary> /// /// </summary> void OnDestroy() { Locator.Delete(this); #if IS_PC || UNITY_EDITOR || UNITY_EDITOR_OSX #region Unsubscribe all key bindings this._inputManager.UnsubscribeKey(InputDeviceEventType.MouseClick, (Action <Vector3>)Evt_OnHandleMouseClick); this._inputManager.UnsubscribeKey(InputDeviceEventType.MouseMove, (Action <Vector3>)Evt_OnHandleMouseMove); #endregion #endif #if IS_MOBILE this._inputManager.UnsubscribeKey(InputDeviceEventType.TouchPress, (Action <Vector3>)Evt_OnHandleTouchClick); #endif }
/// <summary> /// Unsubscribes from events! /// </summary> void OnDestroy() { Save(); Observer.Unsubscribe(CommandType.Save, (Action)Evt_OnHandleSaveGame); Locator.Delete <GameSimulationManager>(this); }
/// <summary> /// Raises the destroy event. /// </summary> void OnDestroy() { Locator.Delete(this); }