Exemple #1
0
 public void Remove(EiNetworkPlayerInternal player)
 {
     for (int i = playerList.Count - 1; i >= 0; i--)
     {
         if (playerList [i].Id == player.Id)
         {
             playerList.RemoveAt(i);
             Log("Removed player with id: " + player.Id);
         }
     }
 }
Exemple #2
0
        public void Add(EiNetworkPlayerInternal player)
        {
            bool hasPlayer = false;

            for (int i = playerList.Count - 1; i >= 0; i--)
            {
                if (playerList [i].Id == player.Id)
                {
                    hasPlayer = true;
                    break;
                }
            }
            if (hasPlayer)
            {
                LogError("Already has a player with given id: " + player.Id);
            }
            else
            {
                playerList.Add(player);
            }
        }
Exemple #3
0
 public void AssignLocalPlayer(EiNetworkPlayerInternal player)
 {
     localPlayer = player;
     Add(player);
 }
Exemple #4
0
 public void OnPlayerJoined(EiNetworkPlayerInternal player)
 {
     //Fix player joined setup
 }