Add an ExitDelay field to allow doors to open before exiting.

This commit is contained in:
Paul Chote
2015-04-27 20:54:17 +12:00
parent ccf9d8fe97
commit 8e9a7fd08b
2 changed files with 6 additions and 0 deletions

View File

@@ -77,6 +77,9 @@ namespace OpenRA.Mods.Common.Traits
{
if (exitinfo.MoveIntoWorld)
{
if (exitinfo.ExitDelay > 0)
newUnit.QueueActivity(new Wait(exitinfo.ExitDelay));
newUnit.QueueActivity(move.MoveIntoWorld(newUnit, exit));
newUnit.QueueActivity(new AttackMoveActivity(
newUnit, move.MoveTo(exitLocation, 1)));