prepare to send different data per client
This commit is contained in:
parent
fcd84d2c83
commit
fbaad86555
1 changed files with 245 additions and 128 deletions
|
|
@ -1,11 +1,10 @@
|
|||
using DisplayCommands;
|
||||
using TanksServer.GameLogic;
|
||||
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class DrawMapStep(MapService map) : IDrawStep
|
||||
{
|
||||
public void Draw(PixelGrid buffer)
|
||||
public void Draw(GamePixelGrid pixels)
|
||||
{
|
||||
for (ushort y = 0; y < MapService.PixelsPerColumn; y++)
|
||||
for (ushort x = 0; x < MapService.PixelsPerRow; x++)
|
||||
|
|
@ -13,7 +12,8 @@ internal sealed class DrawMapStep(MapService map) : IDrawStep
|
|||
var pixel = new PixelPosition(x, y);
|
||||
if (!map.Current.IsWall(pixel))
|
||||
continue;
|
||||
buffer[x, y] = true;
|
||||
|
||||
pixels[x, y].EntityType = GamePixelEntityType.Wall;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue