summaryrefslogtreecommitdiff
path: root/scripts/Entities/Actions/ItemAction.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
commitc6bbb834f7758027c0df338f1520f34fad3befea (patch)
tree1818cd23c24be16fbe19b16dd0a510874d440d83 /scripts/Entities/Actions/ItemAction.cs
parentf1b51bed52ffbd90b5b7cc8dcfc6f0484bbbeb3c (diff)
Organização
Diffstat (limited to 'scripts/Entities/Actions/ItemAction.cs')
-rw-r--r--scripts/Entities/Actions/ItemAction.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/scripts/Entities/Actions/ItemAction.cs b/scripts/Entities/Actions/ItemAction.cs
new file mode 100644
index 0000000..14c5d93
--- /dev/null
+++ b/scripts/Entities/Actions/ItemAction.cs
@@ -0,0 +1,39 @@
+using TheLegendOfGustav.Entities.Actors;
+using TheLegendOfGustav.Entities.Items;
+
+namespace TheLegendOfGustav.Entities.Actions;
+
+public partial class ItemAction : Action
+{
+ private ConsumableItem item;
+ private Player player;
+
+ public ItemAction(Player player, ConsumableItem item) : base(player)
+ {
+ Item = item;
+ Player = player;
+ }
+
+ public Player Player
+ {
+ get => player;
+ private set
+ {
+ player = value;
+ }
+ }
+
+ protected ConsumableItem Item
+ {
+ get => item;
+ set
+ {
+ item = value;
+ }
+ }
+
+ public override bool Perform()
+ {
+ return item.Activate(this);
+ }
+} \ No newline at end of file