From 862b399fa37e6ca692d38177a22ee34860d2251e Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 15 Sep 2025 20:00:47 -0300 Subject: Menu principal --- scripts/Entities/Actions/EscapeAction.cs | 13 ++++++ scripts/Entities/Actions/EscapeAction.cs.uid | 1 + scripts/GUI/Details.cs | 34 ++++++++++++--- scripts/GUI/MainMenu.cs | 46 ++++++++++++++++++++ scripts/GUI/MainMenu.cs.uid | 1 + scripts/GUI/MessageLog.cs | 17 +++++++- scripts/Game.cs | 21 +++++++++ scripts/GameManager.cs | 59 ++++++++++++++++++++++++++ scripts/GameManager.cs.uid | 1 + scripts/InputHandling/CastSpellInputHandler.cs | 17 +++++++- scripts/InputHandling/GameOverInputHandler.cs | 8 +++- scripts/InputHandling/InputHandler.cs | 9 ++++ scripts/InputHandling/MainGameInputHandler.cs | 5 +++ scripts/Utils/MessageLogData.cs | 2 +- scripts/Utils/SignalBus.cs | 3 ++ 15 files changed, 227 insertions(+), 10 deletions(-) create mode 100644 scripts/Entities/Actions/EscapeAction.cs create mode 100644 scripts/Entities/Actions/EscapeAction.cs.uid create mode 100644 scripts/GUI/MainMenu.cs create mode 100644 scripts/GUI/MainMenu.cs.uid create mode 100644 scripts/GameManager.cs create mode 100644 scripts/GameManager.cs.uid (limited to 'scripts') diff --git a/scripts/Entities/Actions/EscapeAction.cs b/scripts/Entities/Actions/EscapeAction.cs new file mode 100644 index 0000000..cc5d289 --- /dev/null +++ b/scripts/Entities/Actions/EscapeAction.cs @@ -0,0 +1,13 @@ +using TheLegendOfGustav.Entities.Actors; +using TheLegendOfGustav.Utils; + +namespace TheLegendOfGustav.Entities.Actions; + +public partial class EscapeAction(Actor actor) : Action(actor) +{ + public override bool Perform() + { + SignalBus.Instance.EmitSignal(SignalBus.SignalName.EscapeRequested); + return false; + } +} \ No newline at end of file diff --git a/scripts/Entities/Actions/EscapeAction.cs.uid b/scripts/Entities/Actions/EscapeAction.cs.uid new file mode 100644 index 0000000..380f369 --- /dev/null +++ b/scripts/Entities/Actions/EscapeAction.cs.uid @@ -0,0 +1 @@ +uid://dtxw6x1naf3oc diff --git a/scripts/GUI/Details.cs b/scripts/GUI/Details.cs index 3c64427..3ead3a9 100644 --- a/scripts/GUI/Details.cs +++ b/scripts/GUI/Details.cs @@ -8,31 +8,53 @@ namespace TheLegendOfGustav.GUI; public partial class Details : CanvasLayer { private static readonly LabelSettings lblSettings = GD.Load("res://assets/definitions/message_label_settings.tres"); - - private Map.Map Map { get; set; } + + [Export] + private Map.Map map; private VBoxContainer EntityNames { get; set; } private Godot.Collections.Array Entities { get; set; } = []; private Godot.Collections.Array