From 723e66a82606ee78ca4156a0c0a850185b4c0369 Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 18 Aug 2025 18:43:54 -0300 Subject: IT'S OVER --- scripts/map/Tile.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 scripts/map/Tile.cs (limited to 'scripts/map/Tile.cs') diff --git a/scripts/map/Tile.cs b/scripts/map/Tile.cs new file mode 100644 index 0000000..c910b01 --- /dev/null +++ b/scripts/map/Tile.cs @@ -0,0 +1,22 @@ +using Godot; +using System; + +public partial class Tile : Sprite2D +{ + private TileDefinition definition; + + public bool IsWalkable { get; set; } + + public Tile(Vector2I pos, TileDefinition definition) + { + Centered = false; + Position = Grid.GridToWorld(pos); + SetDefinition(definition); + } + + public void SetDefinition(TileDefinition definition) { + this.definition = definition; + Texture = definition.Texture; + this.IsWalkable = definition.IsWalkable; + } +} -- cgit v1.2.3