supporting cheap queues
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user