planes rearm

This commit is contained in:
Chris Forbes
2009-12-31 11:00:34 +13:00
parent c981739b21
commit d52c7fba0b
6 changed files with 41 additions and 2 deletions

View File

@@ -14,6 +14,12 @@ namespace OpenRa.Game.Traits
}
public bool HasAmmo() { return ammo > 0; }
public bool GiveAmmo()
{
if (ammo >= self.Info.Ammo) return false;
++ammo;
return true;
}
public void Attacking(Actor self) { --ammo; }