mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 23:50:29 +01:00
81 lines
1.8 KiB
C#
81 lines
1.8 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace SceneManager
|
|
{
|
|
public enum State
|
|
{
|
|
Uninitialized,
|
|
Creating,
|
|
Finished
|
|
}
|
|
|
|
public class Path
|
|
{
|
|
public int Number { get; private set; }
|
|
public bool IsEnabled { get; private set; }
|
|
public State State { get; set; }
|
|
|
|
public List<Waypoint> Waypoints = new List<Waypoint>();
|
|
|
|
public Path(int pathNum, bool pathFinished, bool pathDisabled, List<Waypoint> waypoints)
|
|
{
|
|
Number = pathNum;
|
|
IsEnabled = pathDisabled;
|
|
Waypoints = waypoints;
|
|
}
|
|
|
|
public Path(int pathNum, State pathState)
|
|
{
|
|
Number = pathNum;
|
|
State = pathState;
|
|
}
|
|
|
|
public void SetPathNumber(int pathNum)
|
|
{
|
|
Number = pathNum;
|
|
}
|
|
|
|
private void LowerWaypointBlipsOpacity()
|
|
{
|
|
foreach (Waypoint wp in Waypoints)
|
|
{
|
|
wp.Blip.Alpha = 0.5f;
|
|
if (wp.CollectorRadiusBlip)
|
|
{
|
|
wp.CollectorRadiusBlip.Alpha = 0.25f;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void RestoreWaypointBlipsOpacity()
|
|
{
|
|
foreach (Waypoint wp in Waypoints)
|
|
{
|
|
if (wp.Blip)
|
|
{
|
|
wp.Blip.Alpha = 1.0f;
|
|
if (wp.CollectorRadiusBlip)
|
|
{
|
|
wp.CollectorRadiusBlip.Alpha = 0.5f;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public void DisablePath()
|
|
{
|
|
IsEnabled = false;
|
|
LowerWaypointBlipsOpacity();
|
|
}
|
|
|
|
public void EnablePath()
|
|
{
|
|
IsEnabled = true;
|
|
RestoreWaypointBlipsOpacity();
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|