diff --git a/TanksServer/GameLogic/MapEntityManager.cs b/TanksServer/GameLogic/MapEntityManager.cs index 6796a23..bfb976a 100644 --- a/TanksServer/GameLogic/MapEntityManager.cs +++ b/TanksServer/GameLogic/MapEntityManager.cs @@ -13,6 +13,11 @@ internal sealed class MapEntityManager( public IEnumerable Tanks => _tanks; public IEnumerable PowerUps => _powerUps; + public IEnumerable AllEntities => Bullets + .Cast() + .Concat(Tanks) + .Concat(PowerUps); + public void SpawnBullet(Player tankOwner, FloatPosition position, double rotation, bool isExplosive) => _bullets.Add(new Bullet(tankOwner, position, rotation, isExplosive)); @@ -50,9 +55,7 @@ internal sealed class MapEntityManager( var tilePixelCenter = tile.ToPixelPosition().GetPixelRelative(4, 4).ToFloatPosition(); - var minDistance = Bullets - .Cast() - .Concat(Tanks) + var minDistance = AllEntities .Select(entity => entity.Position.Distance(tilePixelCenter)) .Aggregate(double.MaxValue, Math.Min); diff --git a/TanksServer/assets/powerup_explosive.png b/TanksServer/assets/powerup_explosive.png index 257ad67..f1854d2 100644 Binary files a/TanksServer/assets/powerup_explosive.png and b/TanksServer/assets/powerup_explosive.png differ