public void Update() { if ((Input.GetKeyDown(KeyCode.Escape) && config.enableEscapePause) && (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.EDITOR)) { paused = !paused; if (subscene) { if (paused) { InputLockManager.SetControlLock(ControlTypes.All, "TotalTime"); } else { InputLockManager.RemoveControlLock("TotalTime"); } } } if (Input.GetKeyDown(KeyCode.F2)) { F2 = !F2; } if (gui == null) { gui = this.gameObject.AddComponent <MainMenuGui> (); gui.UpdateToolbarStock(); gui.SetConfigVisible(false); } if (HighLogic.LoadedScene != GameScenes.MAINMENU) { if (MainMenuGui.TT_Button == null) { GameEvents.onGUIApplicationLauncherReady.Add(gui.OnGUIApplicationLauncherReady); } gui.OnGUIShowApplicationLauncher(); } }
public void Update() { if ((Input.GetKeyDown (KeyCode.Escape) && config.enableEscapePause) && (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.EDITOR)) { paused = !paused; if (subscene) { if (paused) InputLockManager.SetControlLock (ControlTypes.All, "TotalTime"); else InputLockManager.RemoveControlLock ("TotalTime"); } } if (Input.GetKeyDown (KeyCode.F2)) F2 = !F2; if (gui == null) { gui = this.gameObject.AddComponent<MainMenuGui> (); gui.UpdateToolbarStock (); gui.SetConfigVisible (false); } if (HighLogic.LoadedScene != GameScenes.MAINMENU) { if (MainMenuGui.TT_Button == null) GameEvents.onGUIApplicationLauncherReady.Add (gui.OnGUIApplicationLauncherReady); gui.OnGUIShowApplicationLauncher (); } }