Generic MVP working

This commit is contained in:
Michal Pikulski
2025-12-05 12:18:29 +01:00
committed by Michal Pikulski
parent 11833ba503
commit ab579e2d21
11 changed files with 303 additions and 177 deletions

View File

@@ -68,12 +68,17 @@ namespace Common.Visual
#region Public API - Visibility
/// <summary>
/// Show the trajectory preview line
/// Show the trajectory preview line.
/// Clears any existing trajectory data so nothing displays until UpdateTrajectory is called.
/// </summary>
public void Show()
{
if (_lineRenderer != null)
{
// Clear old trajectory data
_lineRenderer.positionCount = 0;
// Enable the line renderer
_lineRenderer.enabled = true;
}
}
@@ -106,6 +111,21 @@ namespace Common.Visual
}
}
/// <summary>
/// Force hide the trajectory immediately, clearing any lock state.
/// Use this when transitioning turns or resetting the slingshot.
/// </summary>
public void ForceHide()
{
_isLocked = false;
_lockTimer = 0f;
if (_lineRenderer != null)
{
_lineRenderer.enabled = false;
}
}
#endregion
#region Public API - Update Trajectory (Multiple Overloads)