From d6fc2026917d55fa12713e3d00004ec461cc5971 Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 30 Oct 2025 17:31:00 -0300 Subject: vários andares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/Entities/Actions/TakeStairsAction.cs | 28 ++++++++++++++++++++++++ scripts/Entities/Actions/TakeStairsAction.cs.uid | 1 + 2 files changed, 29 insertions(+) create mode 100644 scripts/Entities/Actions/TakeStairsAction.cs create mode 100644 scripts/Entities/Actions/TakeStairsAction.cs.uid (limited to 'scripts/Entities/Actions') diff --git a/scripts/Entities/Actions/TakeStairsAction.cs b/scripts/Entities/Actions/TakeStairsAction.cs new file mode 100644 index 0000000..17fa7e5 --- /dev/null +++ b/scripts/Entities/Actions/TakeStairsAction.cs @@ -0,0 +1,28 @@ +using Godot; +using TheLegendOfGustav.Entities.Actors; +using TheLegendOfGustav.Utils; + +namespace TheLegendOfGustav.Entities.Actions; + +public partial class TakeStairsAction : Action +{ + public TakeStairsAction(Actor actor) : base(actor) + { + cost = 0; + } + + public override bool Perform() + { + if (Actor.GridPosition == MapData.DownstairsLocation) + { + SignalBus.Instance.EmitSignal(SignalBus.SignalName.PlayerDescent); + MessageLogData.Instance.AddMessage("Você desce as escadas..."); + return true; + } + else + { + MessageLogData.Instance.AddMessage("Não tem escadas aqui..."); + return false; + } + } +} \ No newline at end of file diff --git a/scripts/Entities/Actions/TakeStairsAction.cs.uid b/scripts/Entities/Actions/TakeStairsAction.cs.uid new file mode 100644 index 0000000..03b2448 --- /dev/null +++ b/scripts/Entities/Actions/TakeStairsAction.cs.uid @@ -0,0 +1 @@ +uid://c0adtd8ynoh4q -- cgit v1.2.3