Exemplo n.º 1
0
        public void ShowLeaderboard(ButtonEventArgs args)
        {
#if UNITY_IOS
#if GAMECENTER
            if (GameCenterBinding.isPlayerAuthenticated())
            {
                GameCenterBinding.showLeaderboardWithTimeScope(GameCenterLeaderboardTimeScope.AllTime);
            }
            else
            {
                StartLeaderboard();
            }
#else
            Core.Utility.Popup.PopupMessages.Me.NativeFuncionNonAvailableMessage();
#endif
#endif

#if UNITY_ANDROID
#if GPGSERVIES
            if (!PlayGameServices.isSignedIn())
            {
                StartLeaderboard(false);
            }
            else
            {
                PlayGameServices.showLeaderboards();
            }
#else
            Core.Utility.Popup.PopupMessages.Me.NativeFuncionNonAvailableMessage();
#endif
#endif
        }
Exemplo n.º 2
0
    //=============================================================================

    public void DisplayScoreboards()
    {
                #if UNITY_IPHONE
        GameCenterBinding.showLeaderboardWithTimeScope(GameCenterLeaderboardTimeScope.AllTime);
                #endif

                #if UNITY_ANDROID
        PlayGameServices.showLeaderboards();
                #endif
    }
Exemplo n.º 3
0
 public void ShowLeaderboard()
 {
     if (IsSignedIn)
     {
         PlayGameServices.showLeaderboards();
     }
     else
     {
         PlayGameServices.authenticate();
     }
 }
Exemplo n.º 4
0
        public static void ShowPlayGameCenterLeaderboards()
        {
            if (!PlayGameCenterManager.isAuthenticated)
            {
                PlayGameCenterManager.TryAuthentication(true);
            }
#if UNITY_IOS || UNITY_TVOS
            GameCenterBinding.showLeaderboardWithTimeScope(GameCenterLeaderboardTimeScope.AllTime);
#elif UNITY_ANDROID && !CHS
            PlayGameServices.showLeaderboards();
#endif
        }
 public void DisplayLeaderboardsList()
 {
                 #if UNITY_ANDROID
     if (Enabled)
     {
         PlayGameServices.showLeaderboards();
     }
     else
     {
         Login();
     }
                 #endif
 }
Exemplo n.º 6
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();
        }
    }