separate tick steps
This commit is contained in:
parent
898a9cedc1
commit
a9aaf899a2
1 changed files with 238 additions and 193 deletions
13
TanksServer/TickSteps/SendToClientScreen.cs
Normal file
13
TanksServer/TickSteps/SendToClientScreen.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using TanksServer.Servers;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
|
||||
internal sealed class SendToClientScreen(
|
||||
ClientScreenServer clientScreenServer, PixelDrawer drawer
|
||||
) : ITickStep
|
||||
{
|
||||
public Task TickAsync()
|
||||
{
|
||||
return Task.WhenAll(clientScreenServer.GetConnections().Select(c => c.SendAsync(drawer.LastFrame)));
|
||||
}
|
||||
}
|
||||
Reference in a new issue