예제 #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (!isShaking)
        {
            return;
        }

        if (cameraShaker.DecreaseShake(decrementVal))
        {
            isShaking = false;
        }
    }
예제 #2
0
        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();
            }
        }