mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 07:30:40 +01:00
Refactored fields and properties, extracted relevant functions from other classes and consolidated them here
This commit is contained in:
parent
893f1eba0e
commit
42acd1c56a
1 changed files with 51 additions and 6 deletions
|
|
@ -4,17 +4,17 @@ namespace SceneManager
|
|||
{
|
||||
public class Path
|
||||
{
|
||||
public int PathNum;
|
||||
public bool PathFinished;
|
||||
public bool PathDisabled;
|
||||
public List<Waypoint> Waypoint = new List<Waypoint>() { };
|
||||
public int PathNum { get; private set; }
|
||||
public bool PathFinished { get; private set; }
|
||||
public bool PathDisabled { get; private set; }
|
||||
public List<Waypoint> Waypoints = new List<Waypoint>();
|
||||
|
||||
public Path(int pathNum, bool pathFinished, bool pathDisabled, List<Waypoint> waypointData)
|
||||
public Path(int pathNum, bool pathFinished, bool pathDisabled, List<Waypoint> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue