From c6bbb834f7758027c0df338f1520f34fad3befea Mon Sep 17 00:00:00 2001 From: Matheus Date: Tue, 9 Sep 2025 19:09:34 -0300 Subject: Organização MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/Entities/Actions/ItemAction.cs | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 scripts/Entities/Actions/ItemAction.cs (limited to 'scripts/Entities/Actions/ItemAction.cs') 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 -- cgit v1.2.3