Example #1
0
 private void Awake()
 {
     ShipCamera[] cameras = GetComponentsInChildren <ShipCamera>();
     frontCamera    = cameras[0];
     observerCamera = cameras[1];
     currentCamera  = observerCamera;
     frontCamera.gameObject.SetActive(false);
     isCurrentlyFrontCamera = false;
 }
Example #2
0
        private void ToggleView()
        {
            frontCamera.gameObject.SetActive(!isCurrentlyFrontCamera);
            observerCamera.gameObject.SetActive(isCurrentlyFrontCamera);

            isCurrentlyFrontCamera = !isCurrentlyFrontCamera;

            currentCamera.SetRadarMode(false);
            currentCamera = isCurrentlyFrontCamera ? frontCamera : observerCamera;
            currentCamera.SetRadarMode(radarOn);
        }