Пример #1
0
        /// <summary>
        /// 创建实例
        /// </summary>
        /// <param name="maxWaitSec">在执行退出方法前最多等待秒数</param>
        public QuitManager(float maxWaitSec)
        {
            if (Instance != null)
            {
                throw new System.NotSupportedException("QuitManager不允许多次实例化");
            }

            Instance     = this;
            _maxWaitTime = maxWaitSec;
        }
Пример #2
0
        public void Release()
        {
            if (Instance == this)
            {
                Instance = null;
            }

            _waitIds.Clear();
            _currState = State.Shut;
        }