コード例 #1
0
        // Start is called before the first frame update
        void Start()
        {
            if (_instance != null && _instance != this)
            {
                Destroy(gameObject);
            }
            else
            {
                _instance = this;
            }

            cam = GetComponent <Camera>();
            GetScreenSwipeAngle();
        }
コード例 #2
0
        // Start is called before the first frame update
        void Start()
        {
            if (_instance != null && _instance != this)
            {
                Destroy(gameObject);
            }
            else
            {
                _instance = this;
            }

            // SETUP SCREEN SHAKE
            if (cam != null)
            {
                virtualCameraNoise = cam.GetCinemachineComponent <Cinemachine.CinemachineBasicMultiChannelPerlin>();
            }

            virtualCameraNoise.m_AmplitudeGain = 0f;
            ShakeElapsedTime = 0f;
            //__

            GetScreenSwipeAngle();
        }