summaryrefslogtreecommitdiff
path: root/scripts/Entities/Items/ItemEntity.cs
blob: e646e4060eb5d15981ea4698ff16a6a4719d05c5 (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
using Godot;
using TheLegendOfGustav.Entities;
using TheLegendOfGustav.Map;

namespace TheLegendOfGustav.Entities.Items;

public partial class ItemEntity : Entity
{
	public Item Item { get; private set; }

	public ItemEntity(Vector2I initialPosition, MapData map, Item item) : base(initialPosition, map)
	{
		Item = item;
		// Eu quero muito reescrever o jogo do zero, mas não tenho tempo :(
		EntityDefinition sad = new()
		{
			blocksMovement = true,
			name = item.Definition.DisplayName,
			texture = item.Definition.Icon,
			Type = EntityType.ITEM,
		};

		SetDefinition(sad);
	}
}