public void OnConnected(object sender, EventArgs e) { State.Write(EState.Online); }
public void OnConnected(object sender, EventArgs e) => isClientConnected?.Write(true);
/// <summary> /// Store the new <see cref="gameState"/>, which will be processed in <see cref="Upate"/> by <see cref="InGameBehaviour"/> in the next frame. /// </summary> /// <param name="sender">Must be the <see cref="Client"/></param> /// <param name="e">Ignored.</param> public void OnGameUpdated(object sender, EventArgs e) { var client = sender as Client; gameState.Write(client.GameClient); }
/// <summary> /// Event handler for when the opponents list is updated. /// </summary> /// <param name="sender">Not used.</param> /// <param name="e">Must contains the updated opponent list in its Users field.</param> public void OnOpponentListUpdated(object sender, TEventArgs <List <User> > e) => Opponents.Write(e.Data);