servicepoint-tanks/TanksServer/Graphics/BulletDrawer.cs

16 lines
377 B
C#
Raw Normal View History

using DisplayCommands;
2024-04-10 19:25:45 +02:00
using TanksServer.GameLogic;
2024-04-10 19:25:45 +02:00
namespace TanksServer.Graphics;
internal sealed class BulletDrawer(BulletManager bullets) : IDrawStep
{
public void Draw(PixelGrid buffer)
{
foreach (var bullet in bullets.GetAll())
{
var pos = bullet.Position.ToPixelPosition();
buffer[pos.X, pos.Y] = true;
}
}
}