Beispiel #1
0
 public void SetControlledCamera(ScreenMeshHalfInCameraController smc)
 {
     _ControlledCamera = smc;
     if (_ControlledCamera)
     {
         _Projector = _ControlledCamera.gameObject.GetComponentsInChildren <GVProjector>(true)[0];
         _Projector.SetController(_ControlledCamera);
     }
 }
 void CheckControllerAera(Vector2 iPos)
 {
     if (_ControllerArr != null)
     {
         foreach (ScreenMeshHalfInCameraController controller in _ControllerArr)
         {
             if (controller.CheckInCameraScreenArea(iPos))
             {
                 _CurrentController = controller;
                 break;
             }
         }
     }
 }
    void SwitchCamera(CameraControllerBase basecam)
    {
        _CurrentControlCamera = basecam;
        if (_CurrentControlCamera == _NavController)
        {
        }
        else if (_CurrentControlCamera == _PlaneCameraController)
        {
            foreach (ScreenMeshHalfInCameraController smic in _MeshHalfInControllerArr)
            {
                smic.gameObject.GetComponentsInChildren <GVProjector>(true)[0].gameObject.SetActive(false);
            }
            _NavController.SetControlledCamera(null);


            _FrameNav.gameObject.SetActive(false);
            _FramesFull[0].gameObject.SetActive(false);
            _FramesFull[1].gameObject.SetActive(false);
            _FramePlane.gameObject.SetActive(true);
        }
        else
        {
            ScreenMeshHalfInCameraController smc = _CurrentControlCamera as ScreenMeshHalfInCameraController;
            _NavController.SetControlledCamera(smc);

            int i = 0;
            foreach (ScreenMeshHalfInCameraController smic in _MeshHalfInControllerArr)
            {
                if (smic == smc)
                {
                    smic.gameObject.GetComponentsInChildren <GVProjector>(true)[0].gameObject.SetActive(true);
                }
                else
                {
                    smic.gameObject.GetComponentsInChildren <GVProjector>(true)[0].gameObject.SetActive(false);
                }

                _FramesFull[i].gameObject.SetActive(smic == smc);
                i++;
            }

            _FrameNav.gameObject.SetActive(false);
            _FramePlane.gameObject.SetActive(false);
        }
    }
 protected override void Awake()
 {
     _Controller   = gameObject.GetComponentsInChildren <ScreenMeshHalfInCameraController>(true)[0];
     _VRController = gameObject.GetComponentsInChildren <GyroscopeCameraController>(true)[0];
     EnableGyroscope(false);
 }
Beispiel #5
0
 protected override void Awake()
 {
     _MeshHalfInController = gameObject.GetComponentsInChildren <ScreenMeshHalfInCameraController>(true)[0];
     _NavController        = gameObject.GetComponentsInChildren <NavCameraController>(true)[0];
 }