mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added DrawLinesBetweenWaypoints method.
This commit is contained in:
parent
07dcc46abb
commit
435fce3c15
1 changed files with 29 additions and 3 deletions
|
|
@ -1,10 +1,9 @@
|
|||
using Rage;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
namespace SceneManager
|
||||
{
|
||||
|
||||
|
||||
public class Path
|
||||
{
|
||||
private int _number { get; set; }
|
||||
|
|
@ -20,6 +19,7 @@ namespace SceneManager
|
|||
{
|
||||
_number = pathNum;
|
||||
_state = pathState;
|
||||
DrawLinesBetweenWaypoints();
|
||||
}
|
||||
|
||||
public void SetPathNumber(int pathNum)
|
||||
|
|
@ -83,7 +83,33 @@ namespace SceneManager
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void DrawLinesBetweenWaypoints()
|
||||
{
|
||||
GameFiber.StartNew(() =>
|
||||
{
|
||||
while (SettingsMenu.threeDWaypoints.Checked)
|
||||
{
|
||||
if (MenuManager.menuPool.IsAnyMenuOpen())
|
||||
{
|
||||
for (int i = 0; i < Waypoints.Count; i++)
|
||||
{
|
||||
if (i != Waypoints.Count - 1)
|
||||
{
|
||||
if (Waypoints[i + 1].DrivingFlag == VehicleDrivingFlags.StopAtDestination)
|
||||
{
|
||||
Debug.DrawLine(Waypoints[i].Position, Waypoints[i + 1].Position, Color.Orange);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.DrawLine(Waypoints[i].Position, Waypoints[i + 1].Position, Color.Green);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GameFiber.Yield();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue