Ejemplo n.º 1
0
 private void Awake()
 {
     ShipCamera[] cameras = GetComponentsInChildren <ShipCamera>();
     frontCamera    = cameras[0];
     observerCamera = cameras[1];
     currentCamera  = observerCamera;
     frontCamera.gameObject.SetActive(false);
     isCurrentlyFrontCamera = false;
 }
Ejemplo n.º 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);
        }