Ejemplo n.º 1
0
    public static AGSLeaderboard fromHashtable(Hashtable ht)
    {
        var board = new AGSLeaderboard();

        board.name        = ht["name"].ToString();
        board.id          = ht["id"].ToString();
        board.displayText = ht["displayText"].ToString();
        board.scoreFormat = ht["scoreFormat"].ToString();

        // handle scores if we have them
        if (ht.ContainsKey("scores") && ht["scores"] is ArrayList)
        {
            var scoresList = ht["scores"] as ArrayList;
            board.scores = AGSScore.fromArrayList(scoresList);
        }

        return(board);
    }