コード例 #1
0
    public List <UM_Score> GetScoresList(UM_TimeSpan span, UM_CollectionType collection)
    {
        List <UM_Score> scores = new List <UM_Score>();

        if (IsValid)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.Android:
                List <GPScore> gp = gp_Leaderboard.GetScoresList(span.Get_GP_TimeSpan(), collection.Get_GP_CollectionType());
                foreach (GPScore score in gp)
                {
                    scores.Add(new UM_Score(null, score));
                }
                return(scores);

            case RuntimePlatform.IPhonePlayer:
                List <GK_Score> gk = gk_Leaderboard.GetScoresList(span.Get_GK_TimeSpan(), collection.Get_GK_CollectionType());
                foreach (GK_Score score in gk)
                {
                    scores.Add(new UM_Score(score, null));
                }
                return(scores);
            }
        }

        return(scores);
    }
コード例 #2
0
    public List <UM_Score> GetScoresList(UM_TimeSpan span, UM_CollectionType collection)
    {
        List <UM_Score> scores = new List <UM_Score>();

        if (IsValid)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.Android:
                if (UltimateMobileSettings.Instance.PlatformEngine.Equals(UM_PlatformDependencies.Android))
                {
                    List <GPScore> gp = gp_Leaderboard.GetScoresList(span.Get_GP_TimeSpan(), collection.Get_GP_CollectionType());
                    foreach (GPScore score in gp)
                    {
                        scores.Add(new UM_Score(null, score, null));
                    }
                    return(scores);
                }
                else
                {
                    List <GC_Score> gcScores = gc_Leaderboard.GetScoresList(span.Get_GC_TimeSpan());
                    foreach (GC_Score s in gcScores)
                    {
                        scores.Add(new UM_Score(null, null, s));
                    }
                    return(scores);
                }

            case RuntimePlatform.IPhonePlayer:
                List <GK_Score> gk = gk_Leaderboard.GetScoresList(span.Get_GK_TimeSpan(), collection.Get_GK_CollectionType());
                foreach (GK_Score score in gk)
                {
                    scores.Add(new UM_Score(score, null, null));
                }
                return(scores);
            }
        }

        return(scores);
    }