From 20c150e8ccce5aad395e21dc0d0057508376e46c Mon Sep 17 00:00:00 2001 From: BOT Alex <44818698+MagicBOTAlex@users.noreply.github.com> Date: Sun, 21 Apr 2024 12:52:16 +0200 Subject: [PATCH] Update PlacementManager.cs --- Assets/Scripts/PlacementSystem/PlacementManager.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/PlacementSystem/PlacementManager.cs b/Assets/Scripts/PlacementSystem/PlacementManager.cs index f24d0fb..c6599cb 100644 --- a/Assets/Scripts/PlacementSystem/PlacementManager.cs +++ b/Assets/Scripts/PlacementSystem/PlacementManager.cs @@ -105,7 +105,7 @@ public class TowerPlacementManager : MonoBehaviour OnDeselectSlot(CurrentSelectedSlot, slot); CurrentSelectedSlot = slot; - slot.gameObject.GetComponentInChildren().material.color = Color.blue; + slot.gameObject.GetComponentInChildren().material.color = default; } // Called when another slot is getting selected @@ -142,10 +142,13 @@ public class TowerPlacementManager : MonoBehaviour //SilhouettedObject.SetActive(true); SilhouettedObject.transform.parent = slot.TowerSpawnPoint.transform; SilhouettedObject.transform.localPosition = offset; + + slot.gameObject.GetComponentInChildren().material.color = Color.white; } public void OnSlotUnHovered(SlotManager slot, GridManager grid, int x, int y) { + slot.gameObject.GetComponentInChildren().material.color = default; Destroy(SilhouettedObject); } @@ -153,7 +156,6 @@ public class TowerPlacementManager : MonoBehaviour { Destroy(SilhouettedObject); OnTowerPlaced?.Invoke(SelectedTowerInfo); - }