diff --git a/SceneManager/Object Classes/Path.cs b/SceneManager/Object Classes/Path.cs index aa8a761..feb035a 100644 --- a/SceneManager/Object Classes/Path.cs +++ b/SceneManager/Object Classes/Path.cs @@ -4,17 +4,17 @@ namespace SceneManager { public class Path { - public int PathNum; - public bool PathFinished; - public bool PathDisabled; - public List Waypoint = new List() { }; + public int PathNum { get; private set; } + public bool PathFinished { get; private set; } + public bool PathDisabled { get; private set; } + public List Waypoints = new List(); - public Path(int pathNum, bool pathFinished, bool pathDisabled, List waypointData) + public Path(int pathNum, bool pathFinished, bool pathDisabled, List waypoints) { PathNum = pathNum; PathFinished = pathFinished; PathDisabled = pathDisabled; - Waypoint = waypointData; + Waypoints = waypoints; } public Path(int pathNum, bool pathFinished) @@ -22,5 +22,50 @@ namespace SceneManager PathNum = pathNum; PathFinished = pathFinished; } + + public void SetPathNumber(int pathNum) + { + PathNum = pathNum; + } + + public void FinishPath() + { + PathFinished = true; + } + + public void DisablePath() + { + PathDisabled = true; + LowerWaypointBlipsOpacity(); + } + + private void LowerWaypointBlipsOpacity() + { + foreach (Waypoint wp in Waypoints) + { + wp.Blip.Alpha = 0.5f; + if (wp.CollectorRadiusBlip) + { + wp.CollectorRadiusBlip.Alpha = 0.25f; + } + } + } + + public void EnablePath() + { + PathDisabled = false; + } + + private void RestoreWaypointBlipsOpacity() + { + foreach (Waypoint wp in Waypoints) + { + wp.Blip.Alpha = 1.0f; + if (wp.CollectorRadiusBlip) + { + wp.CollectorRadiusBlip.Alpha = 0.5f; + } + } + } } }