From 6842ccfd372601db6b5d3f678ab5ebf03ad2b206 Mon Sep 17 00:00:00 2001 From: Matheus Date: Tue, 2 Sep 2025 12:50:09 -0300 Subject: Adicionado entidade Inspetor. --- scripts/input/InputHandler.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts/input/InputHandler.cs') diff --git a/scripts/input/InputHandler.cs b/scripts/input/InputHandler.cs index 873276f..4f5b4e1 100644 --- a/scripts/input/InputHandler.cs +++ b/scripts/input/InputHandler.cs @@ -3,7 +3,8 @@ using Godot; public enum InputHandlers { MainGame, - GameOver + GameOver, + Inspect } /// @@ -25,7 +26,8 @@ public partial class InputHandler : Node inputHandlers.Add(InputHandlers.MainGame, GetNode("MainGameInputHandler")); // Controles para quando o jogador está morto. inputHandlers.Add(InputHandlers.GameOver, GetNode("GameOverInputHandler")); - + inputHandlers.Add(InputHandlers.Inspect, GetNode("InspectInputHandler")); + SetInputHandler(startingInputHandler); } @@ -39,6 +41,8 @@ public partial class InputHandler : Node /// /// Estado do jogo. public void SetInputHandler(InputHandlers inputhandler) { + selectedInputHandler?.Exit(); selectedInputHandler = inputHandlers[inputhandler]; + selectedInputHandler.Enter(); } } -- cgit v1.2.3