live player info in client
This commit is contained in:
parent
fb675e59ff
commit
a50a9770c9
14 changed files with 193 additions and 70 deletions
|
@ -23,12 +23,12 @@ internal sealed class ControlsServerConnection(
|
|||
Shoot = 0x05
|
||||
}
|
||||
|
||||
protected override void HandleMessage(Memory<byte> buffer)
|
||||
protected override ValueTask HandleMessageAsync(Memory<byte> buffer)
|
||||
{
|
||||
var type = (MessageType)buffer.Span[0];
|
||||
var control = (InputType)buffer.Span[1];
|
||||
|
||||
logger.LogTrace("player input {} {} {}", player.Id, type, control);
|
||||
Logger.LogTrace("player input {} {} {}", player.Id, type, control);
|
||||
|
||||
var isEnable = type switch
|
||||
{
|
||||
|
@ -59,5 +59,7 @@ internal sealed class ControlsServerConnection(
|
|||
default:
|
||||
throw new ArgumentException("invalid control type");
|
||||
}
|
||||
|
||||
return ValueTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue