1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-11 23:50:29 +01:00

Mid-refactor

This commit is contained in:
Rich Dunne 2020-08-18 19:00:29 -06:00
parent b52f160ff7
commit f4c1c0c693
18 changed files with 1721 additions and 916 deletions

View file

@ -0,0 +1,29 @@
using Rage;
namespace SceneManager
{
public class ControlledVehicle
{
public Vehicle Vehicle;
public string LicensePlate;
public int Path;
public int TotalWaypoints;
public int CurrentWaypoint;
public bool TasksAssigned;
public bool DismissNow;
public bool StoppedAtWaypoint;
public bool Redirected;
public ControlledVehicle(Vehicle vehicle, string licensePlate, int path, int totalWaypoints, int currentWaypoint, bool tasksAssigned, bool dismissNow, bool redirected)
{
Vehicle = vehicle;
LicensePlate = licensePlate;
Path = path;
TotalWaypoints = totalWaypoints;
CurrentWaypoint = currentWaypoint;
TasksAssigned = tasksAssigned;
DismissNow = dismissNow;
Redirected = redirected;
}
}
}

View file

@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace SceneManager
{
public class Path
{
public int PathNum;
public bool PathFinished;
public bool PathDisabled;
public List<Waypoint> Waypoint = new List<Waypoint>() { };
public Path(int pathNum, bool pathFinished, bool pathDisabled, List<Waypoint> waypointData)
{
PathNum = pathNum;
PathFinished = pathFinished;
PathDisabled = pathDisabled;
Waypoint = waypointData;
}
public Path(int pathNum, bool pathFinished)
{
PathNum = pathNum;
PathFinished = pathFinished;
}
}
}

View file

@ -0,0 +1,52 @@
using Rage;
namespace SceneManager
{
public class Waypoint
{
public int Path;
public int WaypointNum;
public Vector3 WaypointPos;
public float Speed;
public VehicleDrivingFlags DrivingFlag;
public Blip WaypointBlip;
public uint YieldZone;
public bool Collector;
public float CollectorRadius;
public Blip CollectorRadiusBlip;
// Can this constructor be deleted?
//public Waypoint(int path, Vector3 waypointPos, float speed, VehicleDrivingFlags drivingFlag, Blip waypointBlip, uint yieldZone)
//{
// Path = path;
// WaypointPos = waypointPos;
// Speed = speed;
// DrivingFlag = drivingFlag;
// WaypointBlip = waypointBlip;
// YieldZone = yieldZone;
//}
public Waypoint(int path, int waypointNum, Vector3 waypointPos, float speed, VehicleDrivingFlags drivingFlag, Blip waypointBlip, bool collector, float collectorRadius, uint yieldZone)
{
Path = path;
WaypointNum = waypointNum;
WaypointPos = waypointPos;
Speed = speed;
DrivingFlag = drivingFlag;
WaypointBlip = waypointBlip;
Collector = collector;
CollectorRadius = collectorRadius;
if (collector)
{
YieldZone = yieldZone;
CollectorRadiusBlip = new Blip(waypointBlip.Position, collectorRadius)
{
Color = waypointBlip.Color,
Alpha = 0.5f
};
}
}
}
}