summaryrefslogtreecommitdiff
path: root/scripts/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Entities')
-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