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(); }
private void Start() { speedModifier = GameStatus.GetSpeedModifier(); Debug.Log(speedModifier + ", " + GameStatus.GetSpeedModifier()); }