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