much better building support; phantom selection is dead AGAIN.

This commit is contained in:
Chris Forbes
2009-10-31 23:17:59 +13:00
parent 6cd9d468d3
commit a3dba77f99
7 changed files with 59 additions and 12 deletions

View File

@@ -86,12 +86,14 @@ namespace OpenRa.Game
public int RemainingCost { get; private set; }
public bool Paused = false, Done = false;
public Action OnComplete;
public ProductionItem( string item, int time, int cost )
public ProductionItem( string item, int time, int cost, Action onComplete )
{
Item = item;
RemainingTime = TotalTime = time;
RemainingCost = TotalCost = cost;
OnComplete = onComplete;
}
public void Tick( Player player )
@@ -107,6 +109,8 @@ namespace OpenRa.Game
// item finished; do whatever needs done.
Done = true;
if (OnComplete != null)
OnComplete();
}
}
}