diff --git a/mono/dodge_the_creeps/Player.cs b/mono/dodge_the_creeps/Player.cs index 2b4cdacb0bd..8a55b2ff157 100644 --- a/mono/dodge_the_creeps/Player.cs +++ b/mono/dodge_the_creeps/Player.cs @@ -33,11 +33,8 @@ public override void _Process(double delta) } Position += velocity * (float)delta; - Position = new Vector2( - x: Mathf.Clamp(Position.X, 0, ScreenSize.X), - y: Mathf.Clamp(Position.Y, 0, ScreenSize.Y) - ); - + Position = Position.Clamp(Position, ScreenSize); + if (velocity.X != 0) { animatedSprite.Animation = "right";