move upgrades to tank, serialize objects directly

This commit is contained in:
Vinzenz Schroeter 2024-05-08 00:29:33 +02:00
parent b1df817ece
commit 827b3a9330
16 changed files with 135 additions and 180 deletions

View file

@ -4,8 +4,11 @@ namespace TanksServer.Models;
internal enum PowerUpType
{
MagazineType,
MagazineSize
MagazineSize,
BulletSpeed,
BulletAcceleration,
ExplosiveBullets,
SmartBullets,
}
internal sealed class PowerUp: IMapEntity
@ -15,6 +18,4 @@ internal sealed class PowerUp: IMapEntity
public PixelBounds Bounds => Position.GetBoundsForCenter(MapService.TileSize);
public required PowerUpType Type { get; init; }
public MagazineType? MagazineType { get; init; }
}