summaryrefslogtreecommitdiff
path: root/scripts/entities/actors/Player.cs
blob: 71812e82cc8efb7179746fe324abaf6f8c97c910 (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
using Godot;
using System;

/// <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 Inventory inventory;

	public Player(Vector2I initialPosition, MapData map, PlayerDefinition definition) : base(initialPosition, map, definition)
	{
		this.definition = definition;
		SetDefinition(definition);
	}

	public void SetDefinition(PlayerDefinition definition) {
		inventory = new(definition.InventoryCapacity);

		AddChild(inventory);
	}
}