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