void Awake()
        {
            m_hVirtualCamera = GetComponent <CinemachineVirtualCamera>();
            m_hCameraNoise   = m_hVirtualCamera.GetCinemachineComponent <CinemachineBasicMultiChannelPerlin>();
            if (m_hCameraNoise == null)
            {
                m_hCameraNoise = m_hVirtualCamera.AddCinemachineComponent <CinemachineBasicMultiChannelPerlin>();
            }

            Global_CameraManager.RegisterVirtualController(this);
        }
Пример #2
0
        void Awake()
        {
            if (m_hinstance == null)
            {
                m_hinstance = this;
            }
            else if (m_hinstance != this)
            {
                Destroy(this);
                return;
            }


            Application.quitting += OnAppQuit;
        }
Пример #3
0
 /// <summary>
 /// Shake camera.
 /// </summary>
 public void ShakeCamera()
 {
     Global_CameraManager.ShakeCamera(amplitudeGain, frequencyGain, duration);
 }