Пример #1
0
    void GetSocialScores()
    {
        OKGhostScoreLoader loader = new OKGhostScoreLoader(SampleLeaderboardID);

        loader.ExecuteAsync((sender) => {
            // Do stuff with sender.Scores here.
            //
            // At this point, all scores in sender.Scores are guaranteed to
            // have the metadataBuffer loaded on them.

            foreach (OKScore score in sender.Scores)
            {
                if (score.MetadataBuffer != null)
                {
                    UnityEngine.Debug.Log("Writing first five bytes of metadataBuffer for score: " + score.ScoreID);
                    String s;
                    for (int i = 0; i < 5; i++)
                    {
                        s = String.Format("Byte {0} - Hex: {1:X}", i, score.MetadataBuffer[i]);
                        UnityEngine.Debug.Log("Got back: " + s);
                    }
                }
            }
        });
    }
Пример #2
0
    void GetSocialScores()
    {
        OKGhostScoreLoader loader = new OKGhostScoreLoader(SampleLeaderboardID);
        loader.ExecuteAsync((sender) => {

            // Do stuff with sender.Scores here.
            //
            // At this point, all scores in sender.Scores are guaranteed to
            // have the metadataBuffer loaded on them.

            foreach (OKScore score in sender.Scores) {
                UnityEngine.Debug.Log("Writing first five bytes of metadataBuffer for score: " + score.ScoreID);
                String s;
                for (int i = 0; i < 5; i++) {
                    s = String.Format("Byte {0} - Hex: {1:X}", i, score.MetadataBuffer[i]);
                    UnityEngine.Debug.Log("Got back: " + s);
                }
            }
        });
    }