more commands, change display communication to new lib
This commit is contained in:
parent
38463ac109
commit
7213318838
1 changed files with 240 additions and 417 deletions
|
|
@ -1,13 +1,16 @@
|
|||
using DisplayCommands;
|
||||
using TanksServer.GameLogic;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class BulletDrawer(BulletManager bullets): IDrawStep
|
||||
internal sealed class BulletDrawer(BulletManager bullets) : IDrawStep
|
||||
{
|
||||
public void Draw(PixelDisplayBufferView buffer)
|
||||
public void Draw(PixelGrid buffer)
|
||||
{
|
||||
foreach (var bullet in bullets.GetAll())
|
||||
buffer.Pixels[bullet.Position.ToPixelPosition()] = true;
|
||||
{
|
||||
var pos = bullet.Position.ToPixelPosition();
|
||||
buffer[pos.X, pos.Y] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in a new issue