CancelPlacement -> ExitPlacementMode, also it's not public anymore

This commit is contained in:
Ian Woods 2026-06-02 22:05:41 -07:00
parent 013d4bf150
commit 1d3857cb00

View file

@ -100,7 +100,7 @@ namespace TD.Gameplay
private void OnDisable() private void OnDisable()
{ {
TowerPlacementManager.OnPlacementRejected -= HandlePlacementRejected; TowerPlacementManager.OnPlacementRejected -= HandlePlacementRejected;
CancelPlacement(); ExitPlacementMode();
} }
private void Update() private void Update()
@ -108,7 +108,7 @@ namespace TD.Gameplay
if (pendingCancel) if (pendingCancel)
{ {
pendingCancel = false; pendingCancel = false;
CancelPlacement(); ExitPlacementMode();
return; return;
} }
@ -120,7 +120,7 @@ namespace TD.Gameplay
// Right-click cancels placement. // Right-click cancels placement.
if (mouse.rightButton.wasPressedThisFrame) if (mouse.rightButton.wasPressedThisFrame)
{ {
CancelPlacement(); ExitPlacementMode();
return; return;
} }
@ -180,7 +180,7 @@ namespace TD.Gameplay
} }
// Cancel any existing placement before starting a new one. // Cancel any existing placement before starting a new one.
CancelPlacement(); ExitPlacementMode();
activeDef = def; activeDef = def;
activeTowerTypeId = towerTypeId; activeTowerTypeId = towerTypeId;
@ -191,7 +191,7 @@ namespace TD.Gameplay
/// <summary> /// <summary>
/// Cancels placement mode and destroys the ghost. Safe to call when idle. /// Cancels placement mode and destroys the ghost. Safe to call when idle.
/// </summary> /// </summary>
public void CancelPlacement() void ExitPlacementMode()
{ {
activeDef = null; activeDef = null;
activeTowerTypeId = 0; activeTowerTypeId = 0;