Ejemplo n.º 1
0
 private void PlayerLeft(object sender, PlayerLeftArgs args)
 {
     if (gameRunning)
     {
         playerScores.Remove(args.playerId);
         UIManager.instance.UpdateScoreUI();
     }
 }
Ejemplo n.º 2
0
    public void DespawnPlayer(Player player)
    {
        PlayerLeftArgs args = new PlayerLeftArgs();

        args.player    = player;
        args.playerId  = player.id;
        args.playerNum = players.IndexOf(player);


        player.isPlaying = false;
        GameObject playerObject = playerObjects[player];

        players[args.playerNum] = null;
        playerObjects.Remove(player);
        Destroy(playerObject);
        OnPlayerLeft(args);
    }
Ejemplo n.º 3
0
 public void OnPlayerReturnedEvt(object sender, PlayerLeftArgs args)
 {
     logger.Info($"*** Player {SID(args.p2pId)} has RETURNED!!! to group {args.groupChannel}");
 }
Ejemplo n.º 4
0
 public void OnPlayerMissingEvt(object sender, PlayerLeftArgs args)
 {
     logger.Info($"*** Player {SID(args.p2pId)} is MISSING!!! from group {args.groupChannel}");
 }
Ejemplo n.º 5
0
 protected virtual void OnPlayerLeft(PlayerLeftArgs e)
 {
     PlayerLeft?.Invoke(this, e);
 }