Ejemplo n.º 1
0
 void Start()
 {
     instance           = this;
     virtualCamera      = gameObject.GetComponent <CinemachineVirtualCamera>();
     virtualCameraNoise = virtualCamera.GetCinemachineComponent <Cinemachine.CinemachineBasicMultiChannelPerlin>();
     virtualComposer    = virtualCamera.GetCinemachineComponent <CinemachineComposer>();
 }
Ejemplo n.º 2
0
 private void activateCamera(CinemachineController cam)
 {
     if (active != null)
     {
         active.gameObject.SetActive(false);
     }
     active = cam;
     active.gameObject.SetActive(true);
 }
Ejemplo n.º 3
0
    public void changeCamera(CinemachineController newCam)
    {
        if (!this.enabled)
        {
            return;
        }

        if (m_activeCam != newCam && newCam != null)
        {
            //newCam.resetPitchYaw ();
            newCam.enableCamera();
            if (m_activeCam != null)
            {
                m_activeCam.disableCamera();
            }
            m_activeCam = newCam;
        }
    }