// Update is called once per frame void FixedUpdate() { if (!isShaking) { return; } if (cameraShaker.DecreaseShake(decrementVal)) { isShaking = false; } }
public IEnumerator ShakeCamera() { while (isThrusting && cameraShaker.IncreaseShake(0.07f)) { yield return(null); } while (!isThrusting && cameraShaker.DecreaseShake(0.05f)) { yield return(null); } if (!isThrusting) { cameraShaker.ResetShake(); } }