Placemnet system: patch

This commit is contained in:
BOT Alex 2024-04-21 02:16:52 +02:00
parent db9ecadd86
commit 05555ed075
3 changed files with 285 additions and 4880 deletions

File diff suppressed because it is too large Load Diff

View File

@ -72,6 +72,8 @@ public class CameraSlotClickDetect : MonoBehaviour
} }
else else
{ {
if (PrevHoveredSlot != null)
PrevHoveredSlot.OnUnHovered();
PrevHoveredSlot = null; PrevHoveredSlot = null;
} }
} }

View File

@ -74,7 +74,7 @@ public class TowerPlacementManager : MonoBehaviour
private void OnShopSelected(TowerInfo info) private void OnShopSelected(TowerInfo info)
{ {
SelectedTowerInfo = info; SelectedTowerInfo = info;
SilhouettedObject = null; Destroy(SilhouettedObject);
} }
public void OnSlotClicked(SlotManager slot, GridManager grid, int x, int y) public void OnSlotClicked(SlotManager slot, GridManager grid, int x, int y)
@ -127,9 +127,7 @@ public class TowerPlacementManager : MonoBehaviour
public void OnSlotUnHovered(SlotManager slot, GridManager grid, int x, int y) public void OnSlotUnHovered(SlotManager slot, GridManager grid, int x, int y)
{ {
//SilhouettedObject.SetActive(false); Destroy(SilhouettedObject);
SilhouettedObject.transform.parent = null;
SilhouettedObject.transform.position = Vector3.zero;
} }