예제 #1
0
 void Awake()
 {
     instance = this;
     _        = Setting;
     Application.targetFrameRate = Setting.targetFrameRate;
     Application.wantsToQuit    += () =>
     {
         OnQuitting?.Invoke();
         return(canQuit);
     };
 }
예제 #2
0
        public void SetQuitting()
        {
            if (IsQuitting)
            {
                return;
            }

            if (!IsStarted)
            {
                throw new ContextException(ContextExceptionType.ContextNotStarted);
            }

            IsQuitting = true;

            OnQuitting?.Invoke();
            OnContextQuitting?.Invoke(this);
        }