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

@ -35,7 +35,7 @@ internal sealed class CollideBullets : ITickStep
if (bullet.Timeout > DateTime.Now)
return false;
ExplodeAt(bullet.Position.ToPixelPosition(), bullet.IsExplosive, bullet.Owner);
ExplodeAt(bullet.Position.ToPixelPosition(), bullet.Stats.Explosive, bullet.Owner);
return true;
}
@ -45,7 +45,7 @@ internal sealed class CollideBullets : ITickStep
if (!_map.Current.IsWall(pixel))
return false;
ExplodeAt(pixel, bullet.IsExplosive, bullet.Owner);
ExplodeAt(pixel, bullet.Stats.Explosive, bullet.Owner);
return true;
}
@ -55,7 +55,7 @@ internal sealed class CollideBullets : ITickStep
if (hitTank == null)
return false;
ExplodeAt(bullet.Position.ToPixelPosition(), bullet.IsExplosive, bullet.Owner);
ExplodeAt(bullet.Position.ToPixelPosition(), bullet.Stats.Explosive, bullet.Owner);
return true;
}