diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-17 21:45:07 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-17 21:45:07 -0300 |
| commit | 240156765d88db25dd092fc320005cdb5f28d7a7 (patch) | |
| tree | 2fadb2e7ef9409744f1d086f8f81771a46de2957 /scripts/InputHandler.cs | |
| parent | e9701f8ca459fa0015d78cacdc61aee904675598 (diff) | |
Refactor no sistema de ações
Diffstat (limited to 'scripts/InputHandler.cs')
| -rw-r--r-- | scripts/InputHandler.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/InputHandler.cs b/scripts/InputHandler.cs index 5194841..807ec83 100644 --- a/scripts/InputHandler.cs +++ b/scripts/InputHandler.cs @@ -2,19 +2,19 @@ using Godot; using System; public partial class InputHandler : Node { - public Action GetAction() { + public Action GetAction(Player player) { Action action = null; if (Input.IsActionJustPressed("walk-up")) { - action = new BumpAction(Vector2I.Up); + action = new BumpAction(player, Vector2I.Up); } else if (Input.IsActionJustPressed("walk-down")) { - action = new BumpAction(Vector2I.Down); + action = new BumpAction(player, Vector2I.Down); } else if (Input.IsActionJustPressed("walk-left")) { - action = new BumpAction(Vector2I.Left); + action = new BumpAction(player, Vector2I.Left); } else if (Input.IsActionJustPressed("walk-right")) { - action = new BumpAction(Vector2I.Right); + action = new BumpAction(player, Vector2I.Right); } else if (Input.IsActionJustPressed("skip-turn")) { - action = new BumpAction(Vector2I.Zero); + action = new BumpAction(player, Vector2I.Zero); } return action; |
