Unhardcode more sounds

This commit is contained in:
pchote
2010-02-27 17:01:54 +13:00
parent 3a0c7fc274
commit 1d9f5c8362
8 changed files with 44 additions and 21 deletions

View File

@@ -177,16 +177,17 @@ namespace OpenRa
var diff = Math.Abs(totalMoney - DisplayCash);
var move = Math.Min(Math.Max((int)(diff * displayCashFracPerFrame),
displayCashDeltaPerFrame), diff);
var eva = PlayerActor.Info.Traits.Get<EvaAlertsInfo>();
if (DisplayCash < totalMoney)
{
DisplayCash += move;
Sound.PlayToPlayer(this, "cashup1.aud");
Sound.PlayToPlayer(this, eva.CashTickUp);
}
else if (DisplayCash > totalMoney)
{
DisplayCash -= move;
Sound.PlayToPlayer(this, "cashdn1.aud");
Sound.PlayToPlayer(this, eva.CashTickDown);
}
}