diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-18 18:43:54 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-18 18:43:54 -0300 |
| commit | 723e66a82606ee78ca4156a0c0a850185b4c0369 (patch) | |
| tree | 1aafa29e16a462f812b804e2f3419387ba07b2f2 /scripts/map/Tile.cs | |
| parent | c9057bbd88f14a4e0e572c16452c1ab9baebfe2a (diff) | |
IT'S OVER
Diffstat (limited to 'scripts/map/Tile.cs')
| -rw-r--r-- | scripts/map/Tile.cs | 22 |
1 files changed, 22 insertions, 0 deletions
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; + } +} |
