Esempio n. 1
0
 void LoadRanking()
 {
     foreach (Hiscores.Hiscore hiscore in Social.Instance.hiscores.levels[0].hiscore)
     {
         RankingLine newObj = Instantiate(rankingLine) as RankingLine;
         newObj.Init(hiscore.username, hiscore.score, hiscore.facebookID);
         newObj.transform.SetParent(container.transform);
         newObj.transform.localScale = Vector3.one;
     }
 }
Esempio n. 2
0
    void AddPlayer(string username, string score, int playerId, string facebookID)
    {
        //Debug.Log(username + " scoRe: " + score + " playerId: " + playerId + " facebookID: " + facebookID);

        RankingLine rl = Instantiate(rankingLine) as RankingLine;

        rl.transform.SetParent(container.transform);
        rl.transform.localScale = Vector3.one;
        rl.Init(levelID, username, score, facebookID);

        if (playerId > -1)
        {
            rl.SetMultiplayerColor(playerId);
        }
        else
        {
            rl.SetSinglePlayer();
        }
    }
Esempio n. 3
0
    public void Challenge(RankingLine rankingLine)
    {
        //Data.Instance.Load("ChallengeCreator");
        return;


        if (Data.Instance.userData.mode == UserData.modes.MULTIPLAYER)
        {
            return;
        }

        if (rankingLine.facebookID == Data.Instance.userData.facebookID)
        {
            return;
        }

        Data.Instance.levels.currentLevel            = id;
        Data.Instance.levelData.challenge_facebookID = rankingLine.facebookID;
        Data.Instance.levelData.challenge_username   = rankingLine.playerName;
        Data.Instance.Load("ChallengeConfirm");
    }