void Awake() { instance = this; _ = Setting; Application.targetFrameRate = Setting.targetFrameRate; Application.wantsToQuit += () => { OnQuitting?.Invoke(); return(canQuit); }; }
public void SetQuitting() { if (IsQuitting) { return; } if (!IsStarted) { throw new ContextException(ContextExceptionType.ContextNotStarted); } IsQuitting = true; OnQuitting?.Invoke(); OnContextQuitting?.Invoke(this); }