// Start is called before the first frame update void Start() { m_loadSceneManager = FindObjectOfType <LoadSceneManager>(); m_playerController = FindObjectOfType <PlayerController>(); if (SceneManager.GetActiveScene().name == "EndScene")//EndSceneの時の処理 { //m_audio.Stop();//音楽を止める m_ending = true;//フラグを立てる //Debug.Log("start"); } else { Cursor.visible = false; //カーソルを消す Cursor.lockState = CursorLockMode.Locked; //カメラの向きをマウスと連動させる m_freelook.MoveToTopOfPrioritySubqueue(); //freelookを優先 m_magicCircle.SetActive(false); //魔法陣を非表示 if (m_goolController) { return; } m_goolController = m_goolObject.GetComponent <GoolController>(); m_audio = GetComponent <AudioSource>(); } }
internal void SwitchCamera() { if (mCam.GetComponent <CinemachineBrain>().ActiveVirtualCamera.Name == staticVCam.Name) { movingVCam.MoveToTopOfPrioritySubqueue(); } else { staticVCam.MoveToTopOfPrioritySubqueue(); } }
// Use this for initialization void Start() { if (vcam) { vcam.MoveToTopOfPrioritySubqueue(); } }
/// <summary> /// カメラを制御する /// </summary> void CameraControl() { //右クリックでエイム if (Input.GetButtonDown("Fire2")) { m_magicCircle.SetActive(true); //魔法陣の展開 Camera.main.cullingMask = ~(1 << m_player.layer); //8レイヤー(Plyaer)以外は全部有効にする //////////////////////////////////////////////////////////////////////////////////////////////////////////// //先生に教えてもらったカメラ制御(エイムした時にvcamをFreeLockで見ていた方向にする処理) Vector3 freelookDir = m_freelook.LookAt.position - m_freelook.transform.position; freelookDir.y = 0; float angle = Vector3.SignedAngle(Vector3.forward, freelookDir, Vector3.up); //Debug.Log($"angle: {angle}"); ((CinemachineVirtualCamera)m_vcam).GetCinemachineComponent <CinemachinePOV>().m_HorizontalAxis.Value = angle; ((CinemachineVirtualCamera)m_vcam).GetCinemachineComponent <CinemachinePOV>().m_VerticalAxis.Value = 0f; m_vcam.MoveToTopOfPrioritySubqueue(); //vcamを優先 //////////////////////////////////////////////////////////////////////////////////////////////////////////// } else if (Input.GetButtonUp("Fire2")) { m_magicCircle.SetActive(false); //魔法陣を収束 Camera.main.cullingMask = -1; //全てのレイヤーを有効にする m_freelook.MoveToTopOfPrioritySubqueue(); //freelookを優先 } }
public void SwitchCam(CinemachineVirtualCameraBase vcam) { if (Camera.main.GetComponent <CinemachineBrain>().ActiveVirtualCamera.Name != vcam.Name) { vcam.MoveToTopOfPrioritySubqueue(); } }
protected IEnumerator ExecuteCoroutine() { if (pauseStateMachine) { brain = GameObject.FindObjectOfType <CinemachineBrain>(); vCam = director.GetComponentInChildren <CinemachineVirtualCameraBase>(); vCam.MoveToTopOfPrioritySubqueue(); while (!CinemachineCore.Instance.IsLive(vCam) || brain.IsBlending) { yield return(new WaitForEndOfFrame()); } } director.Play(); while ((director.time + 0.05f) <= director.duration) { yield return(new WaitForEndOfFrame()); } if (pauseStateMachine) { CameraController.instance.virtualCamera.MoveToTopOfPrioritySubqueue(); while (!CinemachineCore.Instance.IsLive(CameraController.instance.virtualCamera) || brain.IsBlending) { yield return(new WaitForEndOfFrame()); } } finished = true; }
void Start() { brain = FindObjectOfType <CinemachineBrain>(); vcamF = true; gameRestart = false; transmit = false; vcamFollow.MoveToTopOfPrioritySubqueue(); }
void OnTriggerEnter(Collider col) { if (col.CompareTag("Player")) { if (switchToCam) { switchToCam.MoveToTopOfPrioritySubqueue(); } } }
public void SetEnable(bool enable, bool moveToTopOfPrioritySubqueue = true) { m_CM_VirtualCameraBase.enabled = enable; if (enable && moveToTopOfPrioritySubqueue) { m_CM_VirtualCameraBase.MoveToTopOfPrioritySubqueue(); } }
void OnTriggerEnter(Collider col) { if (col.CompareTag("Player") && col.gameObject.name == "Woodle Character") { if (switchToCam) { switchToCam.MoveToTopOfPrioritySubqueue(); } } }
public void SwitchCam(CinemachineVirtualCameraBase vcam) { if (brain == null || vcam == null) { return; } if (brain.ActiveVirtualCamera != (ICinemachineCamera)vcam) { vcam.MoveToTopOfPrioritySubqueue(); } }
public void MoveToNewFollowTransform(CinemachineVirtualCameraBase newTarget) { newTarget.MoveToTopOfPrioritySubqueue(); }
void OnTriggerEnter(Collider other) { // 同じ Priority を持つカメラのうち、このカメラを最優先にする m_camera.MoveToTopOfPrioritySubqueue(); }