Пример #1
0
 /// <summary>
 /// Handler for destroy event.
 /// </summary>
 void OnDestroy()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
Пример #2
0
        /// <summary>
        /// Handler for destroy event.
        /// </summary>
        void OnDestroy()
        {
            DebugEx.Verbose("ResizeListenerScript.OnDestroy()");

            if (sInstance == this)
            {
                sInstance = null;
            }
        }
        /// <summary>
        /// Handler for destroy event.
        /// </summary>
        void OnDestroy()
        {
            DebugEx.Verbose("ResizeListenerScript.OnDestroy()");

            if (sInstance == this)
            {
                sInstance = null;
            }
        }
Пример #4
0
        /// <summary>
        /// Script starting callback.
        /// </summary>
        void Start()
        {
            if (instance == null)
            {
                instance = this;
            }
            else
            {
                Debug.LogError("Two instances of ResizeListenerScript not supported");
            }

            mScreenWidth  = Screen.width;
            mScreenHeight = Screen.height;
            mDelay        = CHECK_INTERVAL;

            mListeners = new UnityEvent();
        }
Пример #5
0
        /// <summary>
        /// Script starting callback.
        /// </summary>
        void Start()
        {
            DebugEx.Verbose("ResizeListenerScript.Start()");

            if (sInstance == null)
            {
                sInstance = this;
            }
            else
            {
                DebugEx.Error("Two instances of ResizeListenerScript not supported");
            }

            mScreenWidth  = Screen.width;
            mScreenHeight = Screen.height;
            mDelay        = CHECK_INTERVAL;

            mListeners = new UnityEvent();
        }