mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added method to delete barriers when path is deleted.
This commit is contained in:
parent
ff302d998d
commit
91aaf9b7f2
1 changed files with 9 additions and 0 deletions
|
|
@ -224,6 +224,7 @@ namespace SceneManager.Paths
|
|||
State = State.Deleting;
|
||||
DismissCollectedDrivers();
|
||||
RemoveWaypoints();
|
||||
RemoveBarriers();
|
||||
Game.LogTrivial($"Path {Number} deleted.");
|
||||
}
|
||||
|
||||
|
|
@ -254,5 +255,13 @@ namespace SceneManager.Paths
|
|||
Waypoints.ForEach(x => x.Delete());
|
||||
Waypoints.Clear();
|
||||
}
|
||||
|
||||
private void RemoveBarriers()
|
||||
{
|
||||
foreach(Barrier barrier in Barriers.Where(x => x.IsValid()))
|
||||
{
|
||||
barrier.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue