Esempio n. 1
0
 public void ServerRemoveAccess(Access access)
 {
     if (!HasAccess(access))
     {
         return;
     }
     accessSyncList.Remove((int)access);
 }
Esempio n. 2
0
    IEnumerator PlayerRespawnWait()
    {
        System.Random rnd   = new System.Random();
        int           index = rnd.Next(0, spawnPoints.Count);

        if (spawnPointIndexs.Count == 0)
        {
            FillSpawnPointLIst();
        }

        for (int i = 0; i < spawnPointIndexs.Count; i++)
        {
            if (spawnPointIndexs.Count == 0)
            {
                FillSpawnPointLIst();
            }

            if (spawnPointIndexs.Contains(index))
            {
                if (CheckSpawnPoint(index) == false)
                {
                    spawnPointIndexs.Remove(index);
                    i = spawnPointIndexs.Count + 100;
                }
                else
                {
                    spawnPointIndexs.Remove(index);
                    index = spawnPointIndexs[i];
                }
            }
            else
            {
                index = spawnPointIndexs[i];
            }
        }


        yield return(new WaitForSeconds(3));

        myPlayer.SetActive(true);
        myPlayer.transform.position = spawnPoints[index].position;
        // myPlayer.transform.rotation = spawnPoints[index].rotation;
    }
Esempio n. 3
0
 public void RemoveAccessList(List <Access> accessToBeRemoved)
 {
     for (int i = 0; i < accessToBeRemoved.Count; i++)
     {
         if (accessSyncList.Contains((int)accessToBeRemoved[i]))
         {
             accessSyncList.Remove((int)accessToBeRemoved[i]);
         }
     }
 }
Esempio n. 4
0
 public void RemoveConnection(int connID)
 {
     print("Num Players: " + players.Count);
     playerConnectionIDs.Remove(connID);
     for (int i = 0; i < players.Count; i++)
     {
         Player player = players[i];
         print("one player found for removed connection");
         if (player.connID == connID)
         {
             print("PlayerNum: " + player.playerNum);
             RemovePlayer(player);
             i--;
         }
         print("Continuing loop");
     }
     print("Num Players at End: " + players.Count);
 }
Esempio n. 5
0
    public void RemoveDevice(ID id)
    {
        Device device = GetDeviceFromScene(id);

        // Add name back into pool
        _activeIdNumbers.Remove(id.IdNumber);

        // If found player, remove it
        if (_deviceIdList.Contains(device.Id))
        {
            _deviceIdList.Remove(device.Id);
        }
        else
        {
            Debug.LogError("INTERACT HUB - TRYING TO REMOVE, BUT CANNOT FIND: " + device.Id.FullId);
        }

        Debug.Log("INTERACT - FOUND AND REMOVED: " + device.Id.FullId);
    }
Esempio n. 6
0
    /// <summary>
    /// Removes player from the playerlist
    /// </summary>
    /// <param Connection ID of the PLayer="connectionId"></param>
    public void RemovePlayer(int idNumber)
    {
        Player player = GetPlayer(idNumber);

        // Add name back into pool
        _namePool.Add(player.Id.Name);
        _activeIdNumbers.Remove(idNumber);

        // If found player, remove it
        if (_playerUserIdList.Contains(player.Id.FullId))
        {
            _playerUserIdList.Remove(player.Id.FullId);
        }
        else
        {
            Debug.LogError("HUB - TRYING TO REMOVE, BUT CANNOT FIND: " + player.Id.FullId);
        }

        Debug.Log("HUB - FOUND AND REMOVED: " + player.Id.FullId);
    }
Esempio n. 7
0
 public void    CmdReturnCard(int vID)               //Player gives card back to dealer
 {
     mPlayerDeck.Remove(vID);                        //Player removes from deck
     GM.ServerDealer.ReturnCard(vID);                //Deal adds to their deck
 }
Esempio n. 8
0
 public void removeActivePlayer(int player)
 {
     activePlayers.Remove(player);
     numActive -= 1;
 }
Esempio n. 9
0
 private void CmdTellServerIRemovedAnItem(int itemID)
 {
     listOfItemsID.Remove(itemID);
 }