summaryrefslogtreecommitdiff
path: root/scripts/Entities/Actors/Player.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Entities/Actors/Player.cs')
-rw-r--r--scripts/Entities/Actors/Player.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/Entities/Actors/Player.cs b/scripts/Entities/Actors/Player.cs
new file mode 100644
index 0000000..7fd80d4
--- /dev/null
+++ b/scripts/Entities/Actors/Player.cs
@@ -0,0 +1,27 @@
+using Godot;
+using TheLegendOfGustav.Map;
+
+namespace TheLegendOfGustav.Entities.Actors;
+
+/// <summary>
+/// Classe do jogador. Por enquanto não é diferente do Ator, mas isso pode mudar.
+/// </summary>
+[GlobalClass]
+public partial class Player : Actor
+{
+ public Player(Vector2I initialPosition, MapData map, PlayerDefinition definition) : base(initialPosition, map, definition)
+ {
+ Definition = definition;
+ SetDefinition(definition);
+ }
+
+ private PlayerDefinition Definition { get; set; }
+ public Inventory Inventory { get; private set; }
+
+ public void SetDefinition(PlayerDefinition definition)
+ {
+ Inventory = new(definition.InventoryCapacity);
+
+ AddChild(Inventory);
+ }
+}