public Message HostCommandChange(HostCommandChangeMessage message) { Player currentPlayer = _websocket.GetCurrentSessionPlayer(); Assert.ThrowIfNull(currentPlayer, "requires a user session", _websocket); var outgoingMessage = new HostCommandChangedMessage { Payload = message.Payload }; _websocket.Broadcast(outgoingMessage, currentPlayer.GameInstanceRef, meToo: false); return(null); }
// send a dummy, placeholder command, when operating as the host void SendHostFloobieCommand() { HostCommandChangeMessage message = new HostCommandChangeMessage() { Payload = new GameCommand { Name = "floobie", ObjectId = "test", Params = new Dictionary <string, string>() } }; message.Payload.Params["foo"] = "bar"; stateFluxClient.SendRequest(message); }