// 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); } }
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); } }
// 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); }
// 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 ); }
// Shows the standard GameCenter leaderboard with the given time scope. public static void showLeaderboardWithTimeScope( GameCenterLeaderboardTimeScope timeScope ) { if( Application.platform == RuntimePlatform.IPhonePlayer ) _gameCenterShowLeaderboardWithTimeScope( (int)timeScope ); }
public static void showGameCenterViewController( GameCenterViewControllerState viewState, GameCenterLeaderboardTimeScope timeScope, string leaderboardId ) { if( Application.platform == RuntimePlatform.IPhonePlayer ) _gameCenterShowGameCenterViewController( (int)viewState, (int)timeScope, leaderboardId ); }
// 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 ); }
// 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); }
public static void showGameCenterViewController(GameCenterViewControllerState viewState, GameCenterLeaderboardTimeScope timeScope, string leaderboardId) { if (Application.platform == RuntimePlatform.IPhonePlayer) { _gameCenterShowGameCenterViewController((int)viewState, (int)timeScope, leaderboardId); } }
// Shows the standard GameCenter leaderboard with the given time scope. public void ShowLeaderBoardWithTimeScope(GameCenterLeaderboardTimeScope timeScope) { GameCenterBinding.showLeaderboardWithTimeScope(timeScope); }
// 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 ); }
// 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 }
public static void ShowLeaderboard(GameCenterLeaderboardTimeScope timeScope, bool popup = false) { ShowLeaderboard(timeScope, "", popup); }
// 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 ); }
public void ShowGameCenterViewController(GameCenterViewControllerState viewState, GameCenterLeaderboardTimeScope timeScope, string leaderboardId) { GameCenterBinding.showGameCenterViewController(viewState, timeScope, leaderboardId); }