Exemple #1
0
 public void OnConnected(object sender, EventArgs e)
 {
     State.Write(EState.Online);
 }
Exemple #2
0
 public void OnConnected(object sender, EventArgs e) => isClientConnected?.Write(true);
Exemple #3
0
    /// <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);
    }
Exemple #4
0
 /// <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);