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; } }
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(); } }
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); }
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); } } }
public static void GoHome() { SceneManager.LoadScene(0); PlatformMonitor.ResetMonitorText(); }
public override void Activate(GameManager gameManager) { base.Activate(gameManager); PlatformMonitor.SetMonitorText(sentence); }
public override void Deactivate() { base.Deactivate(); PlatformMonitor.ResetMonitorText(); }