コード例 #1
0
ファイル: TacticsServer.cs プロジェクト: Phantasma5/DaveClone
    // Get the player for the given client id
    Player GetPlayerByClientId(long aClientId)
    {
        for (int i = 0; i < players.Count; i++)
        {
            if (players[i].clientId == aClientId)
            {
                return(players[i]);
            }
        }

        // If we can't find the player for this client, who are they? kick them
        Debug.Log("Unable to get player for unknown client " + aClientId);
        serverNet.Kick(aClientId);
        return(null);
    }
コード例 #2
0
 //////////////////////////
 // RPCs from the admin client
 //////////////////////////
 public void ClientKick(long aClientId)
 {
     serverNet.Kick(aClientId);
 }