diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-28 17:21:38 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-28 17:21:38 -0300 |
| commit | e17510951f1136f4afeb2afbf76c47df151b299b (patch) | |
| tree | 411f03c6e577380d4b84295c1796ce1aabe46813 /scripts/map/Tile.cs | |
| parent | 358943907bc9e37d26618ee03adf1ffd97635335 (diff) | |
Mapa iluminado
Diffstat (limited to 'scripts/map/Tile.cs')
| -rw-r--r-- | scripts/map/Tile.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/map/Tile.cs b/scripts/map/Tile.cs index 67b9be5..39f7486 100644 --- a/scripts/map/Tile.cs +++ b/scripts/map/Tile.cs @@ -44,9 +44,10 @@ public partial class Tile : Sprite2D /// Elementos neste tile estão dentro do campo de visão do jogador. /// </summary> public bool IsInView { - get => this.isInView; + get => isInView; set { - this.isInView = value; + isInView = value; + Modulate = isInView ? definition.LitColor : definition.DarkColor; if (IsInView && !IsExplored) { IsExplored = true; } @@ -72,6 +73,7 @@ public partial class Tile : Sprite2D /// <param name="definition">Definição do tile.</param> public void SetDefinition(TileDefinition definition) { this.definition = definition; + Modulate = definition.DarkColor; Texture = definition.Texture; IsWalkable = definition.IsWalkable; IsTransparent = definition.IsTransparent; |
