From f1b51bed52ffbd90b5b7cc8dcfc6f0484bbbeb3c Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 8 Sep 2025 22:10:45 -0300 Subject: inventário acessivel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/input/MainGameInputHandler.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/input/MainGameInputHandler.cs') 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. /// public partial class MainGameInputHandler : BaseInputHandler { - private readonly Godot.Collections.Dictionary directions = new() + private static readonly Godot.Collections.Dictionary 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().SetInputHandler(InputHandlers.Inventory); + } + if (Input.IsActionJustPressed("pick-item")) { GetParent().SetInputHandler(InputHandlers.Pickup); } -- cgit v1.2.3