private void Awake() { if (!hasInitialised) { hasInitialised = true; Instance = this; } }
protected void Awake() { try { GameEvents.onGUIApplicationLauncherReady.Add(this.createButton); CountdownToLaunch.Log("AppButton Created"); } catch (Exception e) { CountdownToLaunch.Error("Couldn't create AppButton: " + e.Message); } }
private void createButton() { if (this.lButton == null /* && !hasInitialised*/) // Have we already created the button? /*hasInitialised = true;*/ { CountdownToLaunch.Log("Adding Application button"); this.lButton = ApplicationLauncher.Instance.AddModApplication( this.onTrue, this.onFalse, null, null, null, null, ApplicationLauncher.AppScenes.FLIGHT, GameDatabase.Instance.GetTexture("iPeer/CountdownToLaunch/clock.png", false)); } }