summaryrefslogtreecommitdiff
path: root/scripts/Entities/Actions/PickUpAction.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Entities/Actions/PickUpAction.cs')
-rw-r--r--scripts/Entities/Actions/PickUpAction.cs15
1 files changed, 3 insertions, 12 deletions
diff --git a/scripts/Entities/Actions/PickUpAction.cs b/scripts/Entities/Actions/PickUpAction.cs
index 0dbd672..eaed01c 100644
--- a/scripts/Entities/Actions/PickUpAction.cs
+++ b/scripts/Entities/Actions/PickUpAction.cs
@@ -12,18 +12,9 @@ public partial class PickupAction : DirectionalAction
public PickupAction(Player player, Vector2I offset) : base(player, offset)
{
- Player = player;
+ this.player = player;
// Pegar itens requer um tempo menor.
- Cost = 2;
- }
-
- protected Player Player
- {
- get => player;
- private set
- {
- player = value;
- }
+ cost = 2;
}
public override bool Perform()
@@ -45,7 +36,7 @@ public partial class PickupAction : DirectionalAction
MapData.RemoveEntity(item);
player.Inventory.Add(item);
- player.Energy -= Cost;
+ player.Energy -= cost;
return true;
}
} \ No newline at end of file