blob: d6fedb998fef6dfa7054aac367021d9aa4a9cc86 (
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
|
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
{
private PlayerDefinition definition;
public Player(Vector2I initialPosition, MapData map, PlayerDefinition definition) : base(initialPosition, map, definition)
{
this.definition = definition;
SetDefinition(definition);
}
public Inventory Inventory { get; private set; }
public void SetDefinition(PlayerDefinition definition)
{
Inventory = new(definition.InventoryCapacity);
AddChild(Inventory);
}
}
|