示例#1
0
        /// <summary>
        /// Unity OnDestroy callback.
        /// </summary>
        protected virtual void OnDestroy()
        {
            if (!Application.isPlaying || TouchManager.Instance == null)
            {
                return;
            }

            StopAllCoroutines();
            manager.RemoveLayer(this);
        }
示例#2
0
        /// <summary>
        /// Unity OnDestroy callback.
        /// </summary>
        protected virtual void OnDestroy()
        {
            if (!Application.isPlaying)
            {
                return;
            }

            StopAllCoroutines();
            if (layerManager != null)
            {
                layerManager.RemoveLayer(this);
            }
        }