lots of stuff fixed; production completion sounds work too.

This commit is contained in:
Chris Forbes
2009-11-08 20:32:07 +13:00
parent 5fd7f477c1
commit f22170800a
3 changed files with 25 additions and 21 deletions

View File

@@ -34,25 +34,16 @@ namespace OpenRa.Game
public bool TakeCash( int num )
{
if (Cash >= num)
{
Cash -= num;
return true;
}
return false;
// TODO: decrease cash.
// returns: if enough cash was available, true
//return true;
if (Cash < num) return false;
Cash -= num;
return true;
}
public void Tick()
{
foreach( var p in production )
{
if( p.Value != null )
p.Value.Tick( this );
}
}
// Key: Production category. Categories are: Building, Infantry, Vehicle, Ship, Plane (and one per super, if they're done in here)