From 639cd8cef403e9e66bf31e7888e786effac2b292 Mon Sep 17 00:00:00 2001 From: Matheus Date: Fri, 24 Oct 2025 21:25:15 -0300 Subject: refactor: Sistema de itens reescrito MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Em tese, este novo sistema é mais fácil de serializar. Descanse em paz pergaminhos, eu não quero reimplementá-los neste novo sistema. --- scripts/Entities/Items/ItemEntity.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/Entities/Items/ItemEntity.cs (limited to 'scripts/Entities/Items/ItemEntity.cs') diff --git a/scripts/Entities/Items/ItemEntity.cs b/scripts/Entities/Items/ItemEntity.cs new file mode 100644 index 0000000..e646e40 --- /dev/null +++ b/scripts/Entities/Items/ItemEntity.cs @@ -0,0 +1,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); + } +} \ No newline at end of file -- cgit v1.2.3