IEnumerator OnLoading() { var done = false; LoadingIndicator.On(() => done); App.Open(); yield return(null); AppImpl.AudioSources = this.audioSources; yield return(null); AppImpl.Open(); yield return(null); AppImpl.SetEventSystem(this.mainEventSystem, this.mainInputModule); yield return(null); this.presentType = Startup.ForceStartPresent; if (null == this.presentType) { var presentFullname = string.Format("Program.Presents.{0}", this.presentName); this.presentType = Type.GetType(presentFullname); } yield return(null); this.loaded = true; if (null != this.presentType) { Present.OpenNextPresent(this.presentType, Present.LoadRuleData.Direct, null, () => done = true); } }
internal void Resume() { if (this.isResetting) { return; } this.suspended = false; if (AppImpl.IsOpened) { AppImpl.Resume(); } for (int n = 0, cnt = this.suspendListeners.Count; n < cnt; ++n) { var listener = this.suspendListeners[n]; if (null != listener) { listener(false); } } Present.Resume(); }
void OnDestroy() { AppImpl.Close(); App.Close(); if (this.appObject) { GameObject.Destroy(this.appObject); } this.appObject = null; }
public static void Reset() { if (App.IsOpened) { App.Singleton.MarkAsResetting(); } if (AppImpl.IsOpened) { AppImpl.Reset(); } Restart.Open(); }
internal void Update() { if (this.isResetting) { return; } if (AppImpl.IsOpened) { AppImpl.Update(); } Present.UpdatePresent(); }