supporting cheap queues

This commit is contained in:
Chris Forbes
2009-12-28 15:28:02 +13:00
parent 3ab095c27c
commit ecf48d6c12
3 changed files with 45 additions and 7 deletions

View File

@@ -11,6 +11,8 @@ namespace OpenRa.Game
public int RemainingTime { get; private set; }
public int RemainingCost { get; private set; }
public int Repeats;
public bool Paused = false, Done = false;
public Action OnComplete;
@@ -24,6 +26,14 @@ namespace OpenRa.Game
OnComplete = onComplete;
}
public void DoRepeat()
{
RemainingTime = TotalTime;
RemainingCost = TotalCost;
Done = false;
--Repeats;
}
public void Tick(Player player)
{
if (Done)