mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 23:50:29 +01:00
Refactored fields/properties for better encapsulation. Replaced int path with Path object.
This commit is contained in:
parent
754bac2949
commit
394538eb26
1 changed files with 17 additions and 37 deletions
|
|
@ -4,55 +4,35 @@ namespace SceneManager
|
||||||
{
|
{
|
||||||
public class CollectedVehicle
|
public class CollectedVehicle
|
||||||
{
|
{
|
||||||
public Ped Driver { get; private set; }
|
private Ped _driver { get; set; }
|
||||||
public Vehicle Vehicle { get; private set; }
|
private Vehicle _vehicle { get; set; }
|
||||||
public string LicensePlate { get; private set; }
|
private Path _path { get; set; }
|
||||||
public int Path { get; private set; }
|
//private int _path { get; set; } // Should change this to a Path object
|
||||||
public int TotalWaypoints { get; private set; }
|
private int _currentWaypoint { get; set; }
|
||||||
public int CurrentWaypoint { get; private set; }
|
private bool _tasksAssigned { get; set; }
|
||||||
public bool TasksAssigned { get; private set; }
|
private bool _stoppedAtWaypoint { get; set; }
|
||||||
public bool DismissNow { get; private set; }
|
|
||||||
public bool StoppedAtWaypoint { get; private set; }
|
|
||||||
|
|
||||||
public CollectedVehicle(Vehicle vehicle, string licensePlate, int path, int totalWaypoints, int currentWaypoint, bool tasksAssigned, bool dismissNow)
|
public Ped Driver { get { return _driver; } set { _driver = value; } }
|
||||||
|
public Vehicle Vehicle { get { return _vehicle; } set { _vehicle = value; } }
|
||||||
|
public Path Path { get { return _path; } set { _path = value; } }
|
||||||
|
public int CurrentWaypoint { get { return _currentWaypoint; } set { _currentWaypoint = value; } }
|
||||||
|
public bool TasksAssigned { get { return _tasksAssigned; } set { _tasksAssigned = value; } }
|
||||||
|
public bool StoppedAtWaypoint { get { return _stoppedAtWaypoint; } set { _stoppedAtWaypoint = value; } }
|
||||||
|
|
||||||
|
public CollectedVehicle(Vehicle vehicle, Path path, int totalWaypoints, int currentWaypoint, bool tasksAssigned)
|
||||||
{
|
{
|
||||||
Vehicle = vehicle;
|
Vehicle = vehicle;
|
||||||
Driver = vehicle.Driver;
|
Driver = vehicle.Driver;
|
||||||
LicensePlate = licensePlate;
|
|
||||||
Path = path;
|
Path = path;
|
||||||
TotalWaypoints = totalWaypoints;
|
|
||||||
CurrentWaypoint = currentWaypoint;
|
CurrentWaypoint = currentWaypoint;
|
||||||
TasksAssigned = tasksAssigned;
|
TasksAssigned = tasksAssigned;
|
||||||
DismissNow = dismissNow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AssignPropertiesFromDirectedTask(int pathNum, int totalPathWaypoints, int currentWaypoint, bool tasksAssigned, bool dismiss, bool stoppedAtWaypoint)
|
public void AssignPropertiesFromDirectedTask(Path path, int totalPathWaypoints, int currentWaypoint, bool tasksAssigned, bool stoppedAtWaypoint)
|
||||||
{
|
{
|
||||||
Path = pathNum;
|
Path = path;
|
||||||
TotalWaypoints = totalPathWaypoints;
|
|
||||||
CurrentWaypoint = currentWaypoint;
|
CurrentWaypoint = currentWaypoint;
|
||||||
TasksAssigned = tasksAssigned;
|
TasksAssigned = tasksAssigned;
|
||||||
DismissNow = dismiss;
|
|
||||||
StoppedAtWaypoint = stoppedAtWaypoint;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetCurrentWaypoint(int currentWaypoint)
|
|
||||||
{
|
|
||||||
CurrentWaypoint = currentWaypoint;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTasksAssigned(bool tasksAssigned)
|
|
||||||
{
|
|
||||||
TasksAssigned = tasksAssigned;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDismissNow(bool dismissNow)
|
|
||||||
{
|
|
||||||
DismissNow = dismissNow;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetStoppedAtWaypoint(bool stoppedAtWaypoint)
|
|
||||||
{
|
|
||||||
StoppedAtWaypoint = stoppedAtWaypoint;
|
StoppedAtWaypoint = stoppedAtWaypoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue