diff options
Diffstat (limited to 'scripts/entities/actors/Player.cs')
| -rw-r--r-- | scripts/entities/actors/Player.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/entities/actors/Player.cs b/scripts/entities/actors/Player.cs index 324e67a..d1c4c7f 100644 --- a/scripts/entities/actors/Player.cs +++ b/scripts/entities/actors/Player.cs @@ -7,7 +7,16 @@ using System; [GlobalClass] public partial class Player : Actor { - public Player(Vector2I initialPosition, MapData map, ActorDefinition definition) : base(initialPosition, map, definition) + public Inventory inventory; + + public Player(Vector2I initialPosition, MapData map, PlayerDefinition definition) : base(initialPosition, map, definition) { + SetDefinition(definition); + } + + public void SetDefinition(PlayerDefinition definition) { + inventory = new(definition.InventoryCapacity); + + AddChild(inventory); } } |
