send scores to big display
This commit is contained in:
parent
a89392beb8
commit
7f00160780
22 changed files with 305 additions and 126 deletions
|
@ -1,11 +1,12 @@
|
|||
using TanksServer.Helpers;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
|
||||
internal sealed class BulletDrawer(BulletManager bullets): IDrawStep
|
||||
{
|
||||
public void Draw(DisplayPixelBuffer buffer)
|
||||
public void Draw(PixelDisplayBufferView buffer)
|
||||
{
|
||||
foreach (var bullet in bullets.GetAll())
|
||||
buffer.Pixels[bullet.Position.ToPixelPosition().ToPixelIndex()] = true;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using TanksServer.Helpers;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
|
||||
internal interface IDrawStep
|
||||
{
|
||||
void Draw(DisplayPixelBuffer buffer);
|
||||
void Draw(PixelDisplayBufferView buffer);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
using TanksServer.Helpers;
|
||||
using TanksServer.Models;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
|
||||
internal sealed class MapDrawer(MapService map) : IDrawStep
|
||||
{
|
||||
public void Draw(DisplayPixelBuffer buffer)
|
||||
public void Draw(PixelDisplayBufferView buffer)
|
||||
{
|
||||
for (var tileY = 0; tileY < MapService.TilesPerColumn; tileY++)
|
||||
for (var tileX = 0; tileX < MapService.TilesPerRow; tileX++)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using TanksServer.Helpers;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
|
@ -29,7 +30,7 @@ internal sealed class TankDrawer : IDrawStep
|
|||
_tankSpriteWidth = tankImage.Width;
|
||||
}
|
||||
|
||||
public void Draw(DisplayPixelBuffer buffer)
|
||||
public void Draw(PixelDisplayBufferView buffer)
|
||||
{
|
||||
foreach (var tank in _tanks)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue