コード例 #1
0
ファイル: TheMatrix.cs プロジェクト: Minstreams/My-Assets
 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);
        }