Exemple #1
0
        private void FixedUpdate()
        {
            Vector2 vel = rb.velocity;

            if (vel.x < 0)
            {
                vel.x = -(speed + speedModifier);
            }
            else
            {
                vel.x = (speed + speedModifier);
            }

            if (vel.y < 0)
            {
                vel.y = -(speed + speedModifier);
            }
            else
            {
                vel.y = (speed + speedModifier);
            }
            rb.velocity   = vel;
            speedModifier = GameStatus.GetSpeedModifier();
        }
Exemple #2
0
 private void Start()
 {
     speedModifier = GameStatus.GetSpeedModifier();
     Debug.Log(speedModifier + ", " + GameStatus.GetSpeedModifier());
 }