Beispiel #1
0
 public void AddClient(ClientReference client)
 {
     client.AssignSlot(GetNextFreeSlot());
     client.clientStatus = ClientReference.ClientStatus.Room;
     clientList.Add(client);
     room.CurPlayer = clientList.Count;
 }
Beispiel #2
0
        public SlotData FindSlotByClient(ClientReference client)
        {
            SlotData slot = slots.Find(x => x.client == client);

            if (slot == null)
            {
                Debug.LogError("FindSlotByClient: Could not find SlotData for client: " + client.GetIdentifier());
            }

            return(slot);
        }
Beispiel #3
0
 public void RemoveClient(ClientReference client)
 {
     client.DetachSlot();
     client.clientStatus = ClientReference.ClientStatus.Lobby;
     client.status       = BrickManDesc.STATUS.PLAYER_WAITING;
     client.deaths       = 0;
     client.kills        = 0;
     client.assists      = 0;
     client.score        = 0;
     clientList.Remove(client);
     room.CurPlayer = clientList.Count;
 }