diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-09 19:09:34 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-09 19:09:34 -0300 |
| commit | c6bbb834f7758027c0df338f1520f34fad3befea (patch) | |
| tree | 1818cd23c24be16fbe19b16dd0a510874d440d83 /scripts/Entities/Actors/Player.cs | |
| parent | f1b51bed52ffbd90b5b7cc8dcfc6f0484bbbeb3c (diff) | |
Organização
Diffstat (limited to 'scripts/Entities/Actors/Player.cs')
| -rw-r--r-- | scripts/Entities/Actors/Player.cs | 27 |
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); + } +} |
