position is now center, socket improvements
This commit is contained in:
parent
40eba7a7c7
commit
d4d0abd013
1 changed files with 129 additions and 101 deletions
13
TanksServer/Graphics/DrawBulletsStep.cs
Normal file
13
TanksServer/Graphics/DrawBulletsStep.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using DisplayCommands;
|
||||
using TanksServer.GameLogic;
|
||||
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class DrawBulletsStep(BulletManager bullets) : IDrawStep
|
||||
{
|
||||
public void Draw(PixelGrid buffer)
|
||||
{
|
||||
foreach (var position in bullets.GetAll().Select(b => b.Position.ToPixelPosition()))
|
||||
buffer[position.X, position.Y] = true;
|
||||
}
|
||||
}
|
||||
Reference in a new issue