private void OnReceiveInput(PlayerMessage.InputUpdate message) { var input = message.Input; input.Timestamp = _fixedClock.CurrentTime; _simulation.SetInput(input); _inputHistory.Enqueue(input); }
private void OnInputReceived(PlayerMessage.InputUpdate message) { _simulation.SetInput(message.Input); // Route the input to other players var peerMessage = _inputMessages.Create(); peerMessage.Content.Input = message.Input; _messageSender.Send(peerMessage, ObjectRole.Others); }