From 5146895cf537dd69867da612abed5b4abaf805cd Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 18 Sep 2025 12:06:59 -0300 Subject: ME ELIMINE AAAAAAAAAAAAAAAAAAAAAAAAAAAA --- scripts/InputHandling/InputHandler.cs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'scripts/InputHandling/InputHandler.cs') diff --git a/scripts/InputHandling/InputHandler.cs b/scripts/InputHandling/InputHandler.cs index 3c39587..e230a01 100644 --- a/scripts/InputHandling/InputHandler.cs +++ b/scripts/InputHandling/InputHandler.cs @@ -23,38 +23,38 @@ public enum InputHandlers public partial class InputHandler : Node { [Export] - private InputHandlers StartingInputHandler { get; set; } + private InputHandlers startingInputHandler; - private Godot.Collections.Dictionary InputHandlerDict { get; set; } = []; + private Godot.Collections.Dictionary inputHandlerDict = []; - private BaseInputHandler SelectedInputHandler { get; set; } + private BaseInputHandler selectedInputHandler; public override void _Ready() { base._Ready(); // Controles para quando o jogador está vivo e jogando normalmente. - InputHandlerDict.Add(InputHandlers.MainGame, GetNode("MainGameInputHandler")); + inputHandlerDict.Add(InputHandlers.MainGame, GetNode("MainGameInputHandler")); // Controles para quando o jogador está morto. - InputHandlerDict.Add(InputHandlers.GameOver, GetNode("GameOverInputHandler")); + inputHandlerDict.Add(InputHandlers.GameOver, GetNode("GameOverInputHandler")); // Controles para observar o cenário - InputHandlerDict.Add(InputHandlers.Inspect, GetNode("InspectInputHandler")); + inputHandlerDict.Add(InputHandlers.Inspect, GetNode("InspectInputHandler")); // Controles para pegar um item do chão. - InputHandlerDict.Add(InputHandlers.Pickup, GetNode("PickupInputHandler")); + inputHandlerDict.Add(InputHandlers.Pickup, GetNode("PickupInputHandler")); // Controles para quando o inventário for aberto. - InputHandlerDict.Add(InputHandlers.Inventory, GetNode("InventoryInputHandler")); + inputHandlerDict.Add(InputHandlers.Inventory, GetNode("InventoryInputHandler")); // Controles para quando o jogador precisar escolher um alvo de feitiço. - InputHandlerDict.Add(InputHandlers.CastSpell, GetNode("CastSpellInputHandler")); + inputHandlerDict.Add(InputHandlers.CastSpell, GetNode("CastSpellInputHandler")); // Controles para quando o menu de feitiços for aberto. - InputHandlerDict.Add(InputHandlers.SpellMenu, GetNode("SpellMenuInputHandler")); + inputHandlerDict.Add(InputHandlers.SpellMenu, GetNode("SpellMenuInputHandler")); - SetInputHandler(StartingInputHandler); + SetInputHandler(startingInputHandler); SignalBus.Instance.CommandInputHandler += SetInputHandler; } public Action GetAction(Player player) { - return SelectedInputHandler.GetAction(player); + return selectedInputHandler.GetAction(player); } public override void _Notification(int what) @@ -73,8 +73,8 @@ public partial class InputHandler : Node /// Estado do jogo. public void SetInputHandler(InputHandlers inputhandler) { - SelectedInputHandler?.Exit(); - SelectedInputHandler = InputHandlerDict[inputhandler]; - SelectedInputHandler.Enter(); + selectedInputHandler?.Exit(); + selectedInputHandler = inputHandlerDict[inputhandler]; + selectedInputHandler.Enter(); } } -- cgit v1.2.3