separate folders per functionality
This commit is contained in:
parent
7f00160780
commit
0ca6a91a7e
1 changed files with 60 additions and 113 deletions
18
TanksServer/Interactivity/SendToClientScreen.cs
Normal file
18
TanksServer/Interactivity/SendToClientScreen.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using TanksServer.GameLogic;
|
||||
using TanksServer.Graphics;
|
||||
|
||||
namespace TanksServer.Interactivity;
|
||||
|
||||
internal sealed class SendToClientScreen(
|
||||
ClientScreenServer clientScreenServer,
|
||||
LastFinishedFrameProvider lastFinishedFrameProvider
|
||||
) : ITickStep
|
||||
{
|
||||
public Task TickAsync()
|
||||
{
|
||||
var tasks = clientScreenServer
|
||||
.GetConnections()
|
||||
.Select(c => c.SendAsync(lastFinishedFrameProvider.LastFrame));
|
||||
return Task.WhenAll(tasks);
|
||||
}
|
||||
}
|
||||
Reference in a new issue