示例#1
0
    void RemovePlayer(NetworkConnection conn)
    {
        connections.Remove(conn);
        GameObject g = GameObject.Find("Gamemode");

        if (g == null)
        {
            return;
        }
        Gamemode gameMode = g.GetComponent <Gamemode>();

        playerListUpdated = true;
        gameMode.RemovePlayer(conn.playerControllers[0].gameObject);
    }