summaryrefslogtreecommitdiff
path: root/scripts/Entities/Actions
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-10-30 17:31:00 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-10-30 17:31:06 -0300
commitd6fc2026917d55fa12713e3d00004ec461cc5971 (patch)
tree54fc79f9f8a217b2477721e21875e74c1736564e /scripts/Entities/Actions
parente40bc38dcc17ebeb40722bedb94a6459e47b9aeb (diff)
vários andares
Diffstat (limited to 'scripts/Entities/Actions')
-rw-r--r--scripts/Entities/Actions/TakeStairsAction.cs28
-rw-r--r--scripts/Entities/Actions/TakeStairsAction.cs.uid1
2 files changed, 29 insertions, 0 deletions
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