KLF.KLFManager.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
        public void Update()
        {
            if (HighLogic.LoadedScene == GameScenes.LOADING)
                return; //Don't do anything while the game is loading

            //Find an instance of the game's RenderingManager
            if (renderManager == null)
                renderManager = (RenderingManager) FindObjectOfType(typeof(RenderingManager));

            //Find an instance of the game's PlanetariumCamera
            if (planetariumCam == null)
                planetariumCam = (PlanetariumCamera)FindObjectOfType(typeof(PlanetariumCamera));

            if (Input.GetKeyDown(KLFGlobalSettings.instance.guiToggleKey))
                KLFInfoDisplay.infoDisplayActive = !KLFInfoDisplay.infoDisplayActive;

            if (Input.GetKeyDown(KLFGlobalSettings.instance.screenshotKey))
                shareScreenshot();

            if (Input.anyKeyDown)
                lastKeyPressTime = UnityEngine.Time.realtimeSinceStartup;

            //Handle key-binding
            if (mappingGUIToggleKey)
            {
                KeyCode key = KeyCode.F7;
                if (getAnyKeyDown(ref key))
                {
                    KLFGlobalSettings.instance.guiToggleKey = key;
                    mappingGUIToggleKey = false;
                }
            }

            if (mappingScreenshotKey)
            {
                KeyCode key = KeyCode.F8;
                if (getAnyKeyDown(ref key))
                {
                    KLFGlobalSettings.instance.screenshotKey = key;
                    mappingScreenshotKey = false;
                }
            }
        }