// Shows the standard GameCenter leaderboard with the given time scope.
 public static void showLeaderboardWithTimeScope(GameCenterLeaderboardTimeScope timeScope)
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         _gameCenterShowLeaderboardWithTimeScope((int)timeScope);
     }
 }
 // Shows the standard GameCenter leaderboard for the given leaderboardId with the given time scope.
 public static void showLeaderboardWithTimeScopeAndLeaderboard(GameCenterLeaderboardTimeScope timeScope, string leaderboardId)
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         _gameCenterShowLeaderboardWithTimeScopeAndLeaderboardId((int)timeScope, leaderboardId);
     }
 }
Example #3
0
        public void RequestScore(string leaderboardID, ScoreController.TimeScope timeScope, bool friendsOnly, int start, int end)
        {
                        #if UNITY_IPHONE && API_SCORE_GAMECENTER
            if (Enabled)
            {
                GameCenterLeaderboardTimeScope convertedScope = GameCenterLeaderboardTimeScope.AllTime;

                switch (timeScope)
                {
                case ScoreController.TimeScope.Today:
                    convertedScope = GameCenterLeaderboardTimeScope.Today;
                    break;

                case ScoreController.TimeScope.Week:
                    convertedScope = GameCenterLeaderboardTimeScope.Week;
                    break;

                case ScoreController.TimeScope.AllTime:
                default:
                    convertedScope = GameCenterLeaderboardTimeScope.AllTime;
                    break;
                }

                GameCenterBinding.retrieveScores(friendsOnly, convertedScope, start, end, leaderboardID);
            }
            else
            {
                Login();
            }
                        #endif
        }
 // Sends a request to get the current scores with the given criteria.  End MUST be between 1 and 100 inclusive.
 public static void retrieveScores(bool friendsOnly, GameCenterLeaderboardTimeScope timeScope, int start, int end, string leaderboardId)
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         _gameCenterRetrieveScoresForLeaderboard(friendsOnly, (int)timeScope, start, end, leaderboardId);
     }
 }
 // Shows the standard GameCenter leaderboard for the given leaderboardId with the given time scope.
 public static void showLeaderboardWithTimeScopeAndLeaderboard(GameCenterLeaderboardTimeScope timeScope, string leaderboardId)
 {
     // Call plugin only when running on real device
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         _gameCenterShowLeaderboardWithTimeScopeAndLeaderboardId((int)timeScope, leaderboardId);
     }
 }
 // Sends a request to get the current scores with the given criteria.  Start and end MUST be between 1 and 100 inclusive.
 public static void retrieveScores(bool friendsOnly, GameCenterLeaderboardTimeScope timeScope, int start, int end)
 {
     // Call plugin only when running on real device
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         _gameCenterRetrieveScores(friendsOnly, (int)timeScope, start, end);
     }
 }
Example #7
0
 // Sends a request to get the current scores with the given criteria.  End MUST be between 1 and 100 inclusive.
 public void LoadScores(bool shouldOnlyLoadFriends, GameCenterLeaderboardTimeScope timeScope, int start, int end, string leaderboardId)
 {
     if (end < 1 || end > 100)
     {
         Debug.Log("GameCenter::LoadScores - Variable 'end' not within bounds  1 < end < 100 : " + end);
         Debug.Log("GameCenter::LoadScores - Failed to load scores");
         return;
     }
     GameCenterBinding.retrieveScores(shouldOnlyLoadFriends, timeScope, start, end, leaderboardId);
 }
Example #8
0
    // Tenta mostrar o ranking de determinada leaderboard
    //
    // Ex1: ShowLeaderboard(GameCenterLeaderboardTimeScope.Today, "com.freegamesandtopapps.baseranking");
    // Irá mostrar a leaderboard com os melhores jogadores do dia
    //
    // Se o GameCenter estiver indisponivel ou o usuario nao estiver autenticado, retorna
    //
    // Ex2: ShowLeaderboard(GameCenterLeaderboardTimeScope.All, "com.freegamesandtopapps.baseranking", true);
    // Irá mostrar a leaderboard com os melhores jogadores no total
    //
    // Se o GameCenter estiver indisponivel ou o usuario nao estiver autenticado, mostra popup informando


#if UNITY_IPHONE
    public static void ShowLeaderboard(GameCenterLeaderboardTimeScope timeScope, string leaderboardId, bool popup = false)
    {
        AuthenticateUser();

        if (!GameCenterAvailable())
        {
            //if (popup) GameGUI.game_native.showMessage(Info.name, MESSAGE_GAMECENTER_UNAVAIBLE);

            return;
        }

        if (!UserIsAuthenticated())
        {
            //if (popup) GameGUI.game_native.showMessage(Info.name, MESSAGE_USER_NOT_AUTHENTICATED);

            return;
        }

                #if UNITY_IPHONE
        GameCenterBinding.showLeaderboardWithTimeScopeAndLeaderboard(timeScope, leaderboardId);
                #endif
    }
 // Shows the standard GameCenter leaderboard for the given leaderboardId with the given time scope.
 public static void showLeaderboardWithTimeScopeAndLeaderboard( GameCenterLeaderboardTimeScope timeScope, string leaderboardId )
 {
     if( Application.platform == RuntimePlatform.IPhonePlayer )
         _gameCenterShowLeaderboardWithTimeScopeAndLeaderboardId( (int)timeScope, leaderboardId );
 }
Example #10
0
 // Shows the standard GameCenter leaderboard with the given time scope.
 public static void showLeaderboardWithTimeScope( GameCenterLeaderboardTimeScope timeScope )
 {
     if( Application.platform == RuntimePlatform.IPhonePlayer )
         _gameCenterShowLeaderboardWithTimeScope( (int)timeScope );
 }
Example #11
0
 public static void showGameCenterViewController( GameCenterViewControllerState viewState, GameCenterLeaderboardTimeScope timeScope, string leaderboardId )
 {
     if( Application.platform == RuntimePlatform.IPhonePlayer )
         _gameCenterShowGameCenterViewController( (int)viewState, (int)timeScope, leaderboardId );
 }
Example #12
0
 // Sends a request to get the current scores with the given criteria. End MUST be between 1 and 100 inclusive.
 public static void retrieveScores( bool friendsOnly, GameCenterLeaderboardTimeScope timeScope, int start, int end )
 {
     if( Application.platform == RuntimePlatform.IPhonePlayer )
         _gameCenterRetrieveScores( friendsOnly, (int)timeScope, start, end );
 }
Example #13
0
 // Shows the standard GameCenter leaderboard for the given leaderboardId with the given time scope.
 public void ShowLeaderBoardWithTimeScope(GameCenterLeaderboardTimeScope timeScope, string leaderboardId)
 {
     GameCenterBinding.showLeaderboardWithTimeScopeAndLeaderboard(timeScope, leaderboardId);
 }
Example #14
0
 public static void showGameCenterViewController(GameCenterViewControllerState viewState, GameCenterLeaderboardTimeScope timeScope, string leaderboardId)
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         _gameCenterShowGameCenterViewController((int)viewState, (int)timeScope, leaderboardId);
     }
 }
Example #15
0
 // Shows the standard GameCenter leaderboard with the given time scope.
 public void ShowLeaderBoardWithTimeScope(GameCenterLeaderboardTimeScope timeScope)
 {
     GameCenterBinding.showLeaderboardWithTimeScope(timeScope);
 }
Example #16
0
 // Sends a request to get the current scores with the given criteria.  Start and end MUST be between 1 and 100 inclusive.
 public static void retrieveScores( bool friendsOnly, GameCenterLeaderboardTimeScope timeScope, int start, int end, string leaderboardId )
 {
     // Call plugin only when running on real device
     if( Application.platform == RuntimePlatform.IPhonePlayer )
         _gameCenterRetrieveScoresForLeaderboard( friendsOnly, (int)timeScope, start, end, leaderboardId );
 }
Example #17
0
	// Tenta mostrar o ranking de determinada leaderboard
	// 
	// Ex1: ShowLeaderboard(GameCenterLeaderboardTimeScope.Today, "com.freegamesandtopapps.baseranking");
	// Irá mostrar a leaderboard com os melhores jogadores do dia
	//
	// Se o GameCenter estiver indisponivel ou o usuario nao estiver autenticado, retorna
	//
	// Ex2: ShowLeaderboard(GameCenterLeaderboardTimeScope.All, "com.freegamesandtopapps.baseranking", true);
	// Irá mostrar a leaderboard com os melhores jogadores no total
	//
	// Se o GameCenter estiver indisponivel ou o usuario nao estiver autenticado, mostra popup informando
	public static void ShowLeaderboard(GameCenterLeaderboardTimeScope timeScope, string leaderboardId, bool popup = false)
	{
		AuthenticateUser();
		
		if (!GameCenterAvailable())
		{
			//if (popup) GameGUI.game_native.showMessage(Info.name, MESSAGE_GAMECENTER_UNAVAIBLE);
			
			return;
		}
		
		if (!UserIsAuthenticated())
		{
			//if (popup) GameGUI.game_native.showMessage(Info.name, MESSAGE_USER_NOT_AUTHENTICATED);
			
			return;
		}
			
		#if UNITY_IPHONE
			GameCenterBinding.showLeaderboardWithTimeScopeAndLeaderboard(timeScope, leaderboardId);
		#endif
	}
Example #18
0
	public static void ShowLeaderboard(GameCenterLeaderboardTimeScope timeScope, bool popup = false)
	{
		ShowLeaderboard(timeScope, "", popup);
	}
Example #19
0
 public static void ShowLeaderboard(GameCenterLeaderboardTimeScope timeScope, bool popup = false)
 {
     ShowLeaderboard(timeScope, "", popup);
 }
Example #20
0
 // Shows the standard GameCenter leaderboard for the given leaderboardId with the given time scope.
 public static void showLeaderboardWithTimeScopeAndLeaderboard( GameCenterLeaderboardTimeScope timeScope, string leaderboardId )
 {
     // Call plugin only when running on real device
     if( Application.platform == RuntimePlatform.IPhonePlayer )
         _gameCenterShowLeaderboardWithTimeScopeAndLeaderboardId( (int)timeScope, leaderboardId );
 }
Example #21
0
 public void ShowGameCenterViewController(GameCenterViewControllerState viewState, GameCenterLeaderboardTimeScope timeScope, string leaderboardId)
 {
     GameCenterBinding.showGameCenterViewController(viewState, timeScope, leaderboardId);
 }