servicepoint-tanks/TanksServer/Graphics/BulletDrawer.cs

14 lines
357 B
C#
Raw Normal View History

2024-04-10 19:25:45 +02:00
using TanksServer.GameLogic;
2024-04-09 22:38:56 +02:00
using TanksServer.ServicePointDisplay;
2024-04-10 19:25:45 +02:00
namespace TanksServer.Graphics;
internal sealed class BulletDrawer(BulletManager bullets): IDrawStep
{
2024-04-09 22:38:56 +02:00
public void Draw(PixelDisplayBufferView buffer)
{
foreach (var bullet in bullets.GetAll())
2024-04-10 22:39:33 +02:00
buffer.Pixels[bullet.Position.ToPixelPosition()] = true;
}
}