summaryrefslogtreecommitdiff
path: root/scripts/Entities/Actions/ItemAction.cs
blob: 14c5d93fa06d06ffc15b82c0bcf849c295b5adf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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);
	}
}