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/Game.cs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'scripts/Game.cs') diff --git a/scripts/Game.cs b/scripts/Game.cs index 3bb1b83..f03aa20 100644 --- a/scripts/Game.cs +++ b/scripts/Game.cs @@ -21,23 +21,23 @@ public partial class Game : Node /// /// O jogo possui o mapa. /// - private Map.Map Map { get; set; } + private Map.Map map; /// /// Objeto para obter input do usuário. /// - private InputHandler InputHandler { get; set; } + private InputHandler inputHandler; /// /// Gerenciador de turnos /// - private TurnManager TurnManager { get; set; } + private TurnManager turnManager; private Hud hud; + private SignalBus.EscapeRequestedEventHandler escapeLambda; + [Signal] public delegate void MainMenuRequestedEventHandler(); - private SignalBus.EscapeRequestedEventHandler escapeLambda; - public override void _Ready() { base._Ready(); @@ -45,9 +45,9 @@ public partial class Game : Node escapeLambda = () => EmitSignal(SignalName.MainMenuRequested); SignalBus.Instance.EscapeRequested += escapeLambda; - Map = GetNode("Map"); + map = GetNode("Map"); - InputHandler = GetNode("InputHandler"); + inputHandler = GetNode("InputHandler"); hud = GetNode("HUD"); // O jogador é criado pelo jogo. @@ -56,15 +56,15 @@ public partial class Game : Node RemoveChild(camera); player.HealthChanged += (int hp, int maxHp) => hud.OnHealthChanged(hp, maxHp); player.ManaChanged += hud.OnManaChanged; - player.Died += () => InputHandler.SetInputHandler(InputHandlers.GameOver); + player.Died += () => inputHandler.SetInputHandler(InputHandlers.GameOver); player.AddChild(camera); - Map.Generate(player); + map.Generate(player); - Map.UpdateFOV(player.GridPosition); + map.UpdateFOV(player.GridPosition); - TurnManager = new(Map); + turnManager = new(map); MessageLogData.Instance.AddMessage("Boa sorte!"); } @@ -90,18 +90,18 @@ public partial class Game : Node { base._PhysicsProcess(delta); - Player player = Map.MapData.Player; + Player player = map.MapData.Player; // Pegamos uma ação do usuário - Action action = InputHandler.GetAction(player); + Action action = inputHandler.GetAction(player); if (action != null) { - TurnManager.InsertPlayerAction(action); + turnManager.InsertPlayerAction(action); } // Computamos um turno. - TurnManager.Tick(); + turnManager.Tick(); } } -- cgit v1.2.3