mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added SetPersistence method to set vehicle and driver persistence when a vehicle is collected.
This commit is contained in:
parent
0ad0136c3a
commit
dcbf52c6bd
1 changed files with 9 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ namespace SceneManager
|
|||
Driver = vehicle.Driver;
|
||||
Path = path;
|
||||
CurrentWaypoint = currentWaypoint;
|
||||
SetPersistence();
|
||||
}
|
||||
|
||||
internal CollectedVehicle(Vehicle vehicle, Path path)
|
||||
|
|
@ -28,6 +29,14 @@ namespace SceneManager
|
|||
Vehicle = vehicle;
|
||||
Driver = vehicle.Driver;
|
||||
Path = path;
|
||||
SetPersistence();
|
||||
}
|
||||
|
||||
internal void SetPersistence()
|
||||
{
|
||||
Vehicle.IsPersistent = true;
|
||||
Driver.IsPersistent = true;
|
||||
Logger.Log($"{Vehicle.Model.Name} and driver are now persistent.");
|
||||
}
|
||||
|
||||
internal void Dismiss(DismissOption dismissOption = DismissOption.FromPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue