From 51d699a7d60f1a30f6235f4ec5fdc15467540b9b Mon Sep 17 00:00:00 2001 From: BOT Alex <44818698+MagicBOTAlex@users.noreply.github.com> Date: Sun, 21 Apr 2024 02:25:19 +0200 Subject: [PATCH] Now exits build mode after placing --- Assets/Scripts/PlacementSystem/PlacementManager.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/Scripts/PlacementSystem/PlacementManager.cs b/Assets/Scripts/PlacementSystem/PlacementManager.cs index 148ceba..ff752b3 100644 --- a/Assets/Scripts/PlacementSystem/PlacementManager.cs +++ b/Assets/Scripts/PlacementSystem/PlacementManager.cs @@ -107,6 +107,9 @@ public class TowerPlacementManager : MonoBehaviour var spawnedTower = Instantiate(towerPrefab, CurrentSelectedSlot.transform); Quaternion newRotation = Quaternion.AngleAxis(CurrentRotation * 90f, transform.up); spawnedTower.transform.localRotation = newRotation; + + Destroy(SilhouettedObject); + OnTowerPlaced?.Invoke(SelectedTowerInfo); } public void OnSlotHovered(SlotManager slot, GridManager grid, int x, int y)