diff options
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); } |
