2024-04-07 19:05:50 +02:00
|
|
|
using TanksServer.Helpers;
|
2024-04-07 20:16:22 +02:00
|
|
|
using TanksServer.Services;
|
2024-04-07 19:05:50 +02:00
|
|
|
|
|
|
|
namespace TanksServer.DrawSteps;
|
|
|
|
|
|
|
|
internal sealed class BulletDrawer(BulletManager bullets): IDrawStep
|
|
|
|
{
|
|
|
|
public void Draw(DisplayPixelBuffer buffer)
|
|
|
|
{
|
|
|
|
foreach (var bullet in bullets.GetAll())
|
2024-04-07 19:19:11 +02:00
|
|
|
buffer.Pixels[bullet.Position.ToPixelPosition().ToPixelIndex()] = true;
|
2024-04-07 19:05:50 +02:00
|
|
|
}
|
|
|
|
}
|