implement reloading
This commit is contained in:
parent
9164d90443
commit
a5a3ca3013
5 changed files with 34 additions and 8 deletions
|
@ -21,11 +21,16 @@ internal sealed class CollectPowerUp(
|
|||
continue;
|
||||
|
||||
// now the tank overlaps the power up by at least 0.5 tiles
|
||||
|
||||
tank.Magazine = tank.Magazine with
|
||||
{
|
||||
UsedBullets = 0,
|
||||
Type = MagazineType.Explosive
|
||||
Type = tank.Magazine.Type | MagazineType.Explosive
|
||||
};
|
||||
|
||||
if (tank.ReloadingUntil >= DateTime.Now)
|
||||
tank.ReloadingUntil = DateTime.Now;
|
||||
|
||||
tank.Owner.Scores.PowerUpsCollected++;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue