Example #1
0
 void Awake()
 {
     if (QLoading.Ended)
     {
         QuickStart.Warning("Reload? Destroy.", "QLoading");
         Destroy(this);
         return;
     }
     if (!QSettings.Instance.enablePauseOnFlight || !QSettings.Instance.Enabled || QSettings.Instance.gameScene != (int)GameScenes.FLIGHT)
     {
         QuickStart.Log("Not need to keep it loaded.", "QFlight");
         QLoading.Ended = true;
         Destroy(this);
         return;
     }
     if (Instance != null)
     {
         QuickStart.Warning("There's already an Instance", "QFlight");
         Destroy(this);
         return;
     }
     Instance = this;
     GameEvents.onFlightReady.Add(OnFlightReady);
     QuickStart.Log("Awake", "QFlight");
 }
Example #2
0
 void OnFlightReady()
 {
     PauseMenu.Display();
     QLoading.Ended = true;
     QuickStart.Log("Not need to keep it loaded.", "QFlight");
     Destroy(this);
     return;
 }
Example #3
0
 void OnDestroy()
 {
     GameEvents.onFlightReady.Remove(OnFlightReady);
     QuickStart.Log("OnDestroy", "QFlight");
 }
Example #4
0
 void Start()
 {
     QuickStart.Log("Start", "QFlight");
 }