コード例 #1
0
        /// <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
        }
コード例 #2
0
 /// <summary>
 /// Unsubscribes from events!
 /// </summary>
 void OnDestroy()
 {
     Save();
     Observer.Unsubscribe(CommandType.Save, (Action)Evt_OnHandleSaveGame);
     Locator.Delete <GameSimulationManager>(this);
 }
コード例 #3
0
 /// <summary>
 /// Raises the destroy event.
 /// </summary>
 void OnDestroy()
 {
     Locator.Delete(this);
 }