add magazine system (cannot reload currently)

This commit is contained in:
Vinzenz Schroeter 2024-04-29 16:39:37 +02:00
parent 4e605d556c
commit 9ccb7c8df8
8 changed files with 86 additions and 32 deletions

View file

@ -21,7 +21,11 @@ internal sealed class CollectPowerUp(
continue;
// now the tank overlaps the power up by at least 0.5 tiles
tank.ExplosiveBullets += 10;
tank.Magazine = tank.Magazine with
{
UsedBullets = 0,
Type = MagazineType.Explosive
};
tank.Owner.Scores.PowerUpsCollected++;
return true;
}