Ejemplo n.º 1
0
    public UM_Score GetScoreByPlayerId(string playerId, UM_TimeSpan span, UM_CollectionType collection)
    {
        UM_Score umScore = null;

        if (IsValid)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.Android:
                GPScore gp = gp_Leaderboard.GetScoreByPlayerId(playerId, span.Get_GP_TimeSpan(), collection.Get_GP_CollectionType());
                if (gp != null)
                {
                    umScore = new UM_Score(null, gp);
                }
                break;

            case RuntimePlatform.IPhonePlayer:
                GK_Score gk = gk_Leaderboard.GetScoreByPlayerId(playerId, span.Get_GK_TimeSpan(), collection.Get_GK_CollectionType());
                if (gk != null)
                {
                    umScore = new UM_Score(gk, null);
                }
                break;
            }
        }
        return(umScore);
    }
Ejemplo n.º 2
0
    public UM_Score GetScoreByPlayerId(string playerId, UM_TimeSpan span, UM_CollectionType collection)
    {
        UM_Score umScore = null;

        if (IsValid)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.Android:
                if (UltimateMobileSettings.Instance.PlatformEngine.Equals(UM_PlatformDependencies.Android))
                {
                    GPScore gp = gp_Leaderboard.GetScoreByPlayerId(playerId, span.Get_GP_TimeSpan(), collection.Get_GP_CollectionType());
                    if (gp != null)
                    {
                        umScore = new UM_Score(null, gp, null);
                    }
                }
                else
                {
                    GC_Score gc = gc_Leaderboard.GetScoreByPlayerId(playerId, span.Get_GC_TimeSpan());
                    if (gc != null)
                    {
                        umScore = new UM_Score(null, null, gc);
                    }
                }
                break;

            case RuntimePlatform.IPhonePlayer:
                GK_Score gk = gk_Leaderboard.GetScoreByPlayerId(playerId, span.Get_GK_TimeSpan(), collection.Get_GK_CollectionType());
                if (gk != null)
                {
                    umScore = new UM_Score(gk, null, null);
                }
                break;
            }
        }
        return(umScore);
    }