Untitled
unknown
csharp
a month ago
523 B
1
Indexable
public void Movement(float delta) { // Only restrict movement when dashing if (!isDashing) { float SPEED = 500f; if (Input.IsKeyPressed(Key.W)) { Position += new Vector2(0, -SPEED) * delta; } if (Input.IsKeyPressed(Key.A)) { Position += new Vector2(-SPEED, 0) * delta; } if (Input.IsKeyPressed(Key.S)) { Position += new Vector2(0, SPEED) * delta; } if (Input.IsKeyPressed(Key.D)) { Position += new Vector2(SPEED, 0) * delta; } }
Editor is loading...
Leave a Comment