Exemple #1
0
 // PoolManager debug
 void OnDisable()
 {
     if (m_cameraFollow != null)
     {
         m_cameraFollow.m_cameraShake = false;
         m_cameraFollow = null;
     }
     CancelInvoke("Start");
     CancelInvoke("ShakeStart");
     CancelInvoke("ShakeEnd");
 }
Exemple #2
0
        // PoolManager
        void OnEnable()
        {
            GameObject obj = GameObject.FindGameObjectWithTag("MainCamera");

            if (obj != null)
            {
                m_cameraFollow = obj.GetComponent <CameraBase>();
                camTransform   = obj.transform;
            }

            CancelInvoke("Start");
            Invoke("Start", 0.000001f);
        }
Exemple #3
0
        private void OnEnable()
        {
            GameObject obj = GameObject.FindGameObjectWithTag("MainCamera");

            if (obj != null)
            {
                m_cameraFollow = obj.GetComponent <CameraBase>();
                camTransform   = obj.transform;
            }

            if (desc == null)
            {
                return;
            }
            beginTime = Time.time;
            isBlurEnd = false;
            setBlur   = false;
            isZoomEnd = false;
        }
Exemple #4
0
        private void DoShake()
        {
            if (null == mCameraBase && null != CoreEntry.gCameraMgr.MainCamera)
            {
                mCameraBase = CoreEntry.gCameraMgr.MainCamera.GetComponent <CameraBase>();
            }

            if (null != mCameraBase)
            {
                if (!mCameraBase.IsDisableCameraShake() && !mCameraBase.m_cameraShake)
                {
                    mCameraBase.m_cameraShake = true;
                    mStartAniTime             = Time.time;

                    float t = mAniCurve[mAniCurve.length - 1].time;
                    Invoke("EndShake", t);
                }
            }

            Invoke("DoShake", mDuration);
        }