Example #1
0
    private void LateUpdate()
    {
        nextConfigCheckIn -= Time.deltaTime;

        if (nextConfigCheckIn <= 0)
        {
            ReloadConfig();
        }

        if (IsKeyJustDown("ToggleModMenu"))
        {
            modMenuObject.SetActive(!modMenuObject.active);
        }

        if (IsKeyJustDown("ToggleInfoHUD"))
        {
            infoHUDObject.SetActive(!infoHUDObject.active);
        }

        if (IsKeyJustDown("PauseAllAnimations"))
        {
            PauseAllAnimations(true);
        }

        if (IsKeyJustDown("PlayAllAnimations"))
        {
            PauseAllAnimations(false);
        }

        DoLoadLevelCheck();
        BTDebugCam.Update();
        BTAnimationPlayerManager.Update();
    }
Example #2
0
    private static void ToggleOrthographicClicked()
    {
        Camera cam = BTDebugCam.FindMainCamera();

        if (cam != null)
        {
            BTDebugCam.ToggleOrthographic(cam);
        }
    }
Example #3
0
    /* Access to UI Content
     * ============================================================================*/

    /*============================================================================
     * Access from Keybinds */

    private void LateUpdate()
    {
        if (cutscenePlayerObject == null)
        {
            return;
        }

        UpdateAvailableCutscenes();
        UpdateProgressUI();

        if (BTDebugCamInputManager.IsKeyJustDown("ToggleCutscenePlayer"))
        {
            ToggleWindowVisibility();
        }

        if (BTDebugCamInputManager.IsKeyJustDown("ToggleCutscenePlayerAnimation"))
        {
            TogglePlayCutscene();
        }

        if ((cutscenePlayerObject.activeInHierarchy && unloockCameraMovementToggle.isOn) || (currentCutsceneObject != null && cameraOverrideCam != null))
        {
            if (cameraOverrideCam == null)
            {
                previousCameraBeforeOverride         = Camera.main;
                previousUICamera                     = Camera.current;
                previousCameraBeforeOverride.enabled = false;
                previousUICamera.enabled             = false;
                cameraOverrideCam                    = this.gameObject.AddComponent <Camera>();
                cameraOverrideCam.cullingMask        = previousCameraBeforeOverride.cullingMask;
                BTDebugCam.SetMainCamera(cameraOverrideCam);
            }
            foreach (Camera cam in UnityEngine.Object.FindObjectsOfType <Camera>())
            {
                if (cam != cameraOverrideCam)
                {
                    cam.enabled = false;
                }
            }
        }
        else
        {
            if (cameraOverrideCam != null)
            {
                BTDebugCam.RemoveMainCamera(cameraOverrideCam);
                UnityEngine.Object.Destroy(cameraOverrideCam);
                cameraOverrideCam = null;
                previousCameraBeforeOverride.enabled = true;
                previousCameraBeforeOverride         = null;
                previousUICamera.enabled             = true;
                previousUICamera = null;
            }
        }
    }
Example #4
0
 private static void DisableWaterClicked()
 {
     BTDebugCam.DisableWater();
 }
Example #5
0
 private static void ToggleSkyboxClicked()
 {
     BTDebugCam.ToggleSkybox();
 }
Example #6
0
 private static void ToggleFogClicked()
 {
     BTDebugCam.ToggleFog();
 }