Esempio n. 1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (!isShaking)
        {
            return;
        }

        if (cameraShaker.DecreaseShake(decrementVal))
        {
            isShaking = false;
        }
    }
Esempio n. 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();
            }
        }