Generic MVP working
This commit is contained in:
committed by
Michal Pikulski
parent
11833ba503
commit
ab579e2d21
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user