Ejemplo n.º 1
0
    public void ShowLeaderboard()
    {
#if UNITY_IPHONE || UNITY_ANDROID
        // show leaderboard UI
        PlayGameServices.showLeaderboard(_leaderboardID, GPGLeaderboardTimeScope.AllTime);
#endif
    }
Ejemplo n.º 2
0
        public static void ShowPlayGameCenterLeaderboard(Leaderboard leaderboard, TimeScope timeScope = TimeScope.AllTime)
        {
            if (!instanceExists)
            {
                return;
            }
            if (!PlayGameCenterManager.isAuthenticated)
            {
                PlayGameCenterManager.TryAuthentication(true);
            }
#if UNITY_IOS || UNITY_TVOS
            GameCenterBinding.showLeaderboardWithTimeScopeAndLeaderboard(TimeScope2GameCenterLeaderboardTimeScope(timeScope), instance.leaderboardInfos[(int)leaderboard].leaderboardId);
#elif UNITY_ANDROID && !CHS
            PlayGameServices.showLeaderboard(instance.leaderboardInfos[(int)leaderboard].leaderboardId);
#endif
        }
Ejemplo n.º 3
0
    private void secondColumnButtions()
    {
        GUILayout.Label("Leaderboards");

        if (GUILayout.Button("Show Leaderboard"))
        {
            PlayGameServices.showLeaderboard("CgkI_-mLmdQEEAIQBQ", GPGLeaderboardTimeScope.AllTime);
        }


        if (GUILayout.Button("Show All Leaderboards"))
        {
            PlayGameServices.showLeaderboards();
        }


        if (GUILayout.Button("Submit Score"))
        {
            PlayGameServices.submitScore("CgkI_-mLmdQEEAIQBQ", 567);
        }


        if (GUILayout.Button("Load Raw Score Data"))
        {
            PlayGameServices.loadScoresForLeaderboard("CgkI_-mLmdQEEAIQBQ", GPGLeaderboardTimeScope.AllTime, false, false);
        }


        if (GUILayout.Button("Get Leaderboard Metadata"))
        {
            var info = PlayGameServices.getAllLeaderboardMetadata();
            Prime31.Utils.logObject(info);
        }


        if (GUILayout.Button("Get Achievement Metadata"))
        {
            var info = PlayGameServices.getAllAchievementMetadata();
            Prime31.Utils.logObject(info);
        }


        if (GUILayout.Button("Reload All Metadata"))
        {
            PlayGameServices.reloadAchievementAndLeaderboardData();
        }
    }
Ejemplo n.º 4
0
        public void Show()
        {
#if UNITY_ANDROID
            Debug.Log("Try to show leaderboard.");
            if (PlayGameServices.isSignedIn())
            {
                Debug.Log("SignedIn. ShowLeaderboard.");
                PlayGameServices.showLeaderboard(_leaderboardId);
            }
            else
            {
                Debug.Log("Not SidngedIn. Authenticate.");
                PlayGameServices.authenticate();
            }
#else
            Debug.Log("Error. AndroidLeaderboard.Show call for not android platform.");
#endif
        }
Ejemplo n.º 5
0
 public void ShowLeaderBoard()
 {
     Debug.Log("Showing Leaderboard");
     PlayGameServices.reloadAchievementAndLeaderboardData();
     PlayGameServices.showLeaderboard("CgkIr87MtK4BEAIQAA");
 }
Ejemplo n.º 6
0
 void ShowLeaderboard()
 {
     PlayGameServices.submitScore("CgkItJD32NYKEAIQAQ", GameManager.cookiesTotal);
     PlayGameServices.showLeaderboard("CgkItJD32NYKEAIQAQ", GPGLeaderboardTimeScope.AllTime);
 }