Example #1
0
 public void SetupGameManagers()
 {
     if (this != null && user != null)
     {
         platform             = user.GetComponentInChildren <CatalystPlatform>();
         cameraRig            = user.GetComponentInChildren <CAVECameraRig>();
         monitor              = user.GetComponentInChildren <PlatformMonitor>();
         photoController      = GetComponentInChildren <PhotoController>();
         inputGuide           = user.GetComponentInChildren <InputGuideController>();
         platform.gameManager = this;
     }
 }
Example #2
0
    public void Deactivate()
    {
        activated = false;
        POIManager.selectedPOI = null;
        GetComponentInChildren <Renderer>().material = POIManager.defaultPOIMat;

        PlatformMonitor.DeactivateMonitorButtons();

        for (int i = 0; i < components.Count; i++)
        {
            components[i].Deactivate();
        }
    }
Example #3
0
    private void SetupCubemapOnCameras(StereoCubemap newCubemap)
    {
        activeCubemap = newCubemap;

        foreach (Camera cam in CAVECameraRig.allCameras)
        {
            //  Debug.Log("Setting material for Camera " + cam.name);

            StereoTargetEyeMask targetEye = cam.stereoTargetEye;

            Material skyboxMaterial = newCubemap.rightEyeCubemap;

            if (targetEye == StereoTargetEyeMask.Left)
            {
                //          Debug.Log("Setting material for left eye Camera: " + cam.name);

                skyboxMaterial = newCubemap.leftEyeCubemap;
            }

            Skybox camSkybox = cam.GetComponent <Skybox>();

            if (camSkybox == null)
            {
                camSkybox = cam.gameObject.AddComponent <Skybox>();
            }

            camSkybox.material = skyboxMaterial;
            camSkybox.enabled  = true;

            if (skyboxMaterial == null)
            {
                //Debug.LogError("No skybox material found for Camera " + cam.name);
            }
        }

        Debug.Log("Added Cubemaps");

        Set3D(CAVECameraRig.is3D);
        PlatformMonitor.SetMonitorText(newCubemap.text);
    }
Example #4
0
    public void Activate(GameManager gameManager)
    {
        //If selected another node without deactivating an old one, then deactivate the old one.
        if (POIManager.selectedPOI != null && POIManager.selectedPOI != this)
        {
            POIManager.selectedPOI.Deactivate();
        }

        activated = true;
        POIManager.selectedPOI = this;
        GetComponentInChildren <Renderer>().material = POIManager.selectedPOIMat;

        PlatformMonitor.ActivateMonitorButtons();

        // Tell all components to activate.
        for (int i = 0; i < components.Count; i++)
        {
            if (components[i].activateImmediately)
            {
                components[i].Activate(gameManager);
            }
        }
    }
Example #5
0
 public static void GoHome()
 {
     SceneManager.LoadScene(0);
     PlatformMonitor.ResetMonitorText();
 }
Example #6
0
    public override void Activate(GameManager gameManager)
    {
        base.Activate(gameManager);

        PlatformMonitor.SetMonitorText(sentence);
    }
Example #7
0
    public override void Deactivate()
    {
        base.Deactivate();

        PlatformMonitor.ResetMonitorText();
    }