Ejemplo n.º 1
0
        private void FixedUpdate()
        {
            if (gameManager.GameOver)
            {
                return;
            }

            enemyCycle();

            AnimationSpeedMinMax.x = Mathf.Clamp(AnimationSpeedMinMax.x, 0.1f, 0.9f);
            AnimationSpeedMinMax.y = Mathf.Clamp(AnimationSpeedMinMax.y, 0.1f, 1.0f);

            TrainAnimator.speed = Mathf.Lerp(
                TrainAnimator.speed,
                targetAnimationSpeed,
                SlowMotionSpeed * Time.deltaTime);

            parallaxer.ParallaxSpeed = Mathf.Lerp(
                parallaxer.ParallaxSpeed,
                targetParallaxSpeed,
                SlowMotionSpeed * Time.deltaTime);

            parallaxer.FixedUpdateRoutine();
        }
Ejemplo n.º 2
0
 private void FixedUpdate()
 {
     parallaxer.FixedUpdateRoutine();
 }