// PoolManager debug void OnDisable() { if (m_cameraFollow != null) { m_cameraFollow.m_cameraShake = false; m_cameraFollow = null; } CancelInvoke("Start"); CancelInvoke("ShakeStart"); CancelInvoke("ShakeEnd"); }
// 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); }
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; }
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); }