From 5146895cf537dd69867da612abed5b4abaf805cd Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 18 Sep 2025 12:06:59 -0300 Subject: ME ELIMINE AAAAAAAAAAAAAAAAAAAAAAAAAAAA --- scripts/Map/Tile.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'scripts/Map/Tile.cs') diff --git a/scripts/Map/Tile.cs b/scripts/Map/Tile.cs index e721fca..488d124 100644 --- a/scripts/Map/Tile.cs +++ b/scripts/Map/Tile.cs @@ -13,7 +13,12 @@ public partial class Tile : Sprite2D { private bool isExplored = false; private bool isInView = false; - + + /// + /// A definição do tile carrega seus valores padrão. + /// + private TileDefinition definition; + public Tile(Vector2I pos, TileDefinition definition) { // Tile herda da classe Sprite2D. @@ -36,10 +41,7 @@ public partial class Tile : Sprite2D /// public bool IsTransparent { get; private set; } - /// - /// A definição do tile carrega seus valores padrão. - /// - private TileDefinition Definition { get; set; } + /// /// Se o jogador já viu este tile antes. /// Tiles não descobertos são invisíveis. @@ -67,7 +69,7 @@ public partial class Tile : Sprite2D set { isInView = value; - Modulate = isInView ? Definition.LitColor : Definition.DarkColor; + Modulate = isInView ? definition.LitColor : definition.DarkColor; if (IsInView && !IsExplored) { IsExplored = true; @@ -81,7 +83,7 @@ public partial class Tile : Sprite2D /// Definição do tile. public void SetDefinition(TileDefinition definition) { - Definition = definition; + this.definition = definition; Modulate = definition.DarkColor; Texture = definition.Texture; IsWalkable = definition.IsWalkable; -- cgit v1.2.3