Beispiel #1
0
 private static void OnSceneUnloaded(Scene scene)
 {
     if (scene.name.Equals("Main"))
     {
         isMainScene = false;
         isIngame    = false;
         OnIngameStatusChanged?.Invoke(new IngameStatusChangedEventArgs()
         {
             ingame = false
         });
         OnMainSceneStatusChanged?.Invoke(new MainSceneStatusChangedEventArgs()
         {
             isMainScene = false
         });
         StatManager.Unload();
         InputHelper.MainSceneUnloaded();
         DebugGUI.MainSceneUnloaded();
     }
 }
Beispiel #2
0
 public void Update()
 {
     if (!isIngame && (isMainScene && !uGUI.main.loading.IsLoading && !uGUI.main.intro.showing))
     {
         isIngame = true;
         OnIngameStatusChanged?.Invoke(new IngameStatusChangedEventArgs()
         {
             ingame = true
         });
     }
     // else if (isIngame && (!isMainScene || uGUI.main.loading.IsLoading || uGUI.main.intro.showing))
     // {
     //     isIngame = false;
     //     OnIngameStatusChanged?.Invoke(new IngameStatusChangedEventArgs()
     //     {
     //         ingame = false
     //     });
     // }
 }