diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-08 22:10:45 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-08 22:10:45 -0300 |
| commit | f1b51bed52ffbd90b5b7cc8dcfc6f0484bbbeb3c (patch) | |
| tree | d607142daee4948765a97008bdef21fa6efa2d2b /scripts/input/MainGameInputHandler.cs | |
| parent | 4b2afd3e2144e42bfa7f11a870584b9255052cf7 (diff) | |
inventário acessivel
Diffstat (limited to 'scripts/input/MainGameInputHandler.cs')
| -rw-r--r-- | scripts/input/MainGameInputHandler.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/input/MainGameInputHandler.cs b/scripts/input/MainGameInputHandler.cs index 6fb6aac..6bda004 100644 --- a/scripts/input/MainGameInputHandler.cs +++ b/scripts/input/MainGameInputHandler.cs @@ -4,7 +4,7 @@ using Godot; /// Esquema de controles principal do jogo. /// </summary> public partial class MainGameInputHandler : BaseInputHandler { - private readonly Godot.Collections.Dictionary<string, Vector2I> directions = new() + private static readonly Godot.Collections.Dictionary<string, Vector2I> directions = new() { {"walk-up", Vector2I.Up}, {"walk-down", Vector2I.Down}, @@ -25,6 +25,10 @@ public partial class MainGameInputHandler : BaseInputHandler { } } + if (Input.IsActionJustPressed("open-inventory")) { + GetParent<InputHandler>().SetInputHandler(InputHandlers.Inventory); + } + if (Input.IsActionJustPressed("pick-item")) { GetParent<InputHandler>().SetInputHandler(InputHandlers.Pickup); } |
