public void RayCamera() { if (rightTooltipController != null) { rightTooltipController.isClickTrigger = false; } if (leftTooltipController != null) { leftTooltipController.isClickTrigger = false; } radiaMenu.transform.parent.gameObject.SetActive(true); uiControllerManager.enabled = true; uiControllerManager.controllerState = ControllerState.isRay; rayCameraScene.SetActive(true); mainMenu.SetActive(false); if (sceneDescription.gameObject.activeSelf) { for (int i = 0; i < sceneDescription.transform.childCount; i++) { sceneDescription.transform.GetChild(i).gameObject.SetActive(true); } } else { sceneDescription.gameObject.SetActive(true); } showVideoBackButton.gameObject.SetActive(false); cameraControllerType = CameraControllerType.followCamera; Camera = rayCameraScene.GetComponentInChildren <Camera>().gameObject; demoIntroduceText.text = demoRayCameraIntroduceText; target = rightEventController.transform.parent; VRCapture.Instance.CaptureVideos = new VRCaptureVideo[] { rayCameraScene.GetComponentInChildren <VRCaptureVideo>() }; }
public void SetCameraController(CameraControllerType type, Transform target) { switch (type) { case CameraControllerType.PLAYER: SetActiveCameraController(playerCameraController, target); break; case CameraControllerType.SPACESHIP: SetActiveCameraController(spaceshipCameraController, target); break; } }
private void InitCameraController() { if (this._controllers.Count != 0) { this._controllers.Clear(); this._curCameraController = null; this._currenCameraControllerType = CameraControllerType.None; } this._controllers.Add(CameraControllerType.None, null); this._controllers.Add(CameraControllerType.Free, new CameraControllerFree(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.Follow, new CameraControllerFollow(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.Center, new CameraControllerCenter(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.MoveByTap, new CameraControllerMoveByMapTap(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.AlwaysFree, new CameraControllerAlwaysFree(this, this._cameraRootTransform, this._camera)); }
public void SetLockViewIcon(CameraControllerType cameraControllerType) { if (this.mDragLock == null) { return; } if (cameraControllerType == CameraControllerType.Free) { GlobalSettings.Instance.isLockView = false; this.mDragLock.GetComponent <UIToggle>().value = true; } if (cameraControllerType == CameraControllerType.Center) { GlobalSettings.Instance.isLockView = true; this.mDragLock.GetComponent <UIToggle>().value = false; } }
public void DoRestoreCameraController() { if (this._currenCameraControllerType == this._lastCameraControllerType) { return; } if (this._curCameraController != null) { this._curCameraController.OnExit(); } if (this._lastCameraControllerType != CameraControllerType.None && this._lastCameraControllerType != CameraControllerType.MoveByTap) { this._currenCameraControllerType = this._lastCameraControllerType; } this._curCameraController = this._controllers[this._currenCameraControllerType]; this._curCameraController.OnEnter(); }
public void Init(PathObjects target, CameraControllerType cc, Action act = null) { stopat.OnEnter = act; if (this.enabled) { state = moveto; } else { state = stopat; } if (target != null) { AutoTarget = target; } this.cameraType = cc; }
public void ChangeCameraController(CameraControllerType cameraControllerType) { if (GameManager.Instance.ReplayController.IsReplayStart) { cameraControllerType = CameraControllerType.Center; } if (cameraControllerType != this._currenCameraControllerType) { if (this._curCameraController != null) { this._curCameraController.OnExit(); } Units player = PlayerControlMgr.Instance.GetPlayer(); if (this._currenCameraControllerType != CameraControllerType.MoveByTap) { this._lastCameraControllerType = this._currenCameraControllerType; } if (this._cameraControllerTypeBeforeDeath == CameraControllerType.None) { this._cameraControllerTypeBeforeDeath = this._currenCameraControllerType; } this._currenCameraControllerType = cameraControllerType; this._curCameraController = this._controllers[this._currenCameraControllerType]; this._curCameraController.OnEnter(); if (Singleton <GoldView> .Instance.gameObject) { Singleton <GoldView> .Instance.SetLockViewIcon(cameraControllerType); } if (Singleton <HUDModuleManager> .Instance.gameObject) { FunctionBtnsModule module = Singleton <HUDModuleManager> .Instance.GetModule <FunctionBtnsModule>(EHUDModule.FunctionBtns); if (module != null) { module.SetLockViewIcon(cameraControllerType); } if (player != null && player.isLive) { this._cameraControllerTypeBeforeDeath = this._currenCameraControllerType; } } } }
public void TouchCamera() { if (rightTooltipController != null) { rightTooltipController.isClickTrigger = false; rightTooltipController.isClickTouchpad = true; rightTooltipController.tooltipController.touchpadText = "Click to Move"; } if (leftTooltipController != null) { leftTooltipController.tooltipController.triggerText = "Click Choose Button"; } uiControllerManager.enabled = true; uiControllerManager.controllerState = ControllerState.isTouch; rightEventController.GetComponent <VRUIController>().controllerState = ControllerState.isTouch; rightEventController.GetComponent <VRDemoUIPointer>().enabled = false; teleport.enabled = true; touchCameraScene.SetActive(true); mainMenu.SetActive(false); if (sceneDescription.gameObject.activeSelf) { for (int i = 0; i < sceneDescription.transform.childCount; i++) { sceneDescription.transform.GetChild(i).gameObject.SetActive(true); } } else { sceneDescription.gameObject.SetActive(true); } showVideoBackButton.gameObject.SetActive(false); cameraControllerType = CameraControllerType.PosingCamera; Camera = touchCameraScene.GetComponentInChildren <Camera>().gameObject; demoIntroduceText.text = demoTouchCameraIntroduceText; target = rightEventController.transform.parent; VRCapture.Instance.CaptureVideos = new VRCaptureVideo[] { touchCameraScene.GetComponentInChildren <VRCaptureVideo>() }; }
public CameraControllerBase GetCameraController(CameraControllerType cameraControllerType) { return(this._controllers[cameraControllerType]); }