private void Awake() { if (Ended) { QuickStart.Warning("Reload? Destroy.", "QLoading"); Destroy(this); return; } if (HighLogic.LoadedScene != GameScenes.LOADING) { QuickStart.Warning("It's not a real Loading? Destroy.", "QLoading"); Ended = true; Destroy(this); return; } if (Instance != null) { QuickStart.Warning("There's already an Instance", "QLoading"); Destroy(this); return; } Instance = this; Button = new GUIStyle(HighLogic.Skin.button); Button.contentOffset = new Vector2(2, 2); Button.alignment = TextAnchor.MiddleCenter; QuickStart.Log("Awake", "QLoading"); }
void Start() { if (Ended) { QDebug.Warning("Reload? Destroy.", "QLoading"); Destroy(this); return; } if (HighLogic.LoadedScene != GameScenes.LOADING) { QDebug.Warning("It's not a real Loading? Destroy.", "QLoading"); Ended = true; Destroy(this); return; } if (Instance != null) { QDebug.Warning("There's already an Instance", "QLoading"); Destroy(this); return; } Instance = this; //QDebug.Log ("Awake", "QLoading"); if (string.IsNullOrEmpty(QSaveGame.LastUsed)) { ScreenMessages.PostScreenMessage("[" + RegisterToolbar.MOD + "]: No savegame found.", 10); QDebug.Log("No savegame found, destroy...", "QLoading"); Ended = true; Destroy(this); return; } QKey.VerifyKey(); QDebug.Log("Start", "QLoading"); if (QSettings.Instance.enableStopWatch) { InvokeRepeating("UpdateStopWatch", 0, 1.0f); } else { StopWatchText = ""; } }
void Awake() { if (Ended) { QDebug.Warning("Reload? Destroy.", "QLoading"); Destroy(this); return; } if (HighLogic.LoadedScene != GameScenes.LOADING) { QDebug.Warning("It's not a real Loading? Destroy.", "QLoading"); Ended = true; Destroy(this); return; } if (Instance != null) { QDebug.Warning("There's already an Instance", "QLoading"); Destroy(this); return; } Instance = this; QDebug.Log("Awake", "QLoading"); }