/// <summary> /// Handles the client requesting a state parameter to be set /// </summary> /// <param name="msg">The message to decode</param> private void HandleGameStateRequest(NetIncomingMessage msg) { StateParameter parameter = StateParameter.CreateEmpty(); parameter.Decode(msg); for (int index = 0; index < Rules.CLIENT_STATE_REQ_VALIDATORS.Count; index++) { Rules.CLIENT_STATE_REQ_VALIDATORS[index].TrySetState(parameter, this, myPlayers[msg.SenderConnection]); } }
/// <summary> /// Handles when the state parameter changed message has been received /// </summary> /// <param name="inMsg">The message to decode from</param> private void HandleStateChanged(NetIncomingMessage inMsg) { StateParameter.Decode(inMsg, myLocalState); }
private void HandleStateChanged() { StateParameter.Decode(lobbyReader, GameState); }