//-------------------------------------- // PUBLIC API CALL METHODS //-------------------------------------- private void Init() { string connectionString = ""; if (AndroidNativeSettings.Instance.EnableGamesAPI) { connectionString += "GamesAPI"; } if (AndroidNativeSettings.Instance.EnableAppStateAPI) { connectionString += "AppStateAPI"; } if (AndroidNativeSettings.Instance.EnablePlusAPI) { connectionString += "PlusAPI"; } if (AndroidNativeSettings.Instance.EnableDriveAPI) { connectionString += "DriveAPI"; } AN_GMSGeneralProxy.setConnectionParams(AndroidNativeSettings.Instance.ShowConnectingPopup); AN_GMSGeneralProxy.playServiceInit(connectionString); }
//-------------------------------------- // PUBLIC API CALL METHODS //-------------------------------------- private void init() { string connectionString = ""; if (AndroidNativeSettings.Instance.EnableGamesAPI) { connectionString += "GamesAPI"; } if (AndroidNativeSettings.Instance.EnableAppStateAPI) { connectionString += "AppStateAPI"; } if (AndroidNativeSettings.Instance.EnablePlusAPI) { connectionString += "PlusAPI"; } if (AndroidNativeSettings.Instance.EnableDriveAPI) { connectionString += "DriveAPI"; } AN_GMSGeneralProxy.playServiceInit(connectionString); _isInitialized = true; }
public void UpdatePlayerScore(string leaderboardId, GPBoardTimeSpan span, GPCollectionType collection) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.UpdatePlayerScore(leaderboardId, (int)span, (int)collection); }
public void ShowAchievementsUI() { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.showAchievementsUI(); }
public void revealAchievement(string achievementName) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.revealAchievement(achievementName); }
public void ShowLeaderBoardsUI() { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.showLeaderBoardsUI(); }
public void UnlockAchievementById(string achievementId) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.reportAchievementById(achievementId); }
public void LoadLeaderBoards() { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.loadLeaderBoards(); }
public void LoadTopScores(string leaderboardId, GPBoardTimeSpan span, GPCollectionType collection, int maxResults) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.loadTopScores(leaderboardId, (int)span, (int)collection, maxResults); }
public void SetStepsImmediate(string achievementId, int numsteps) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.setStepsImmediate(achievementId, numsteps.ToString()); }
public void IncrementAchievementById(string achievementId, int numsteps) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.incrementAchievementById(achievementId, numsteps.ToString()); }
public void ResetAchievement(string achievementId) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.resetAchievement(achievementId); }
public void ResetAllAchievements() { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.ResetAllAchievements(); }
public void LoadFriends() { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.loadConnectedPlayers(); }
public void SubmitScoreById(string leaderboardId, long score) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.submitScoreById(leaderboardId, score); }
public void ShowLeaderBoardById(string leaderboardId) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.showLeaderBoardById(leaderboardId); }
//-------------------------------------- // PUBLIC API CALL METHODS //-------------------------------------- public void ShowSavedGamesUI(string title, int maxNumberOfSavedGamesToShow, bool allowAddButton = true, bool allowDelete = true) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.ShowSavedGamesUI_Bridge(title, maxNumberOfSavedGamesToShow, allowAddButton, allowDelete); }
//-------------------------------------- // PUBLIC API CALL METHODS //-------------------------------------- public void ShowSavedGamesUI(string title, int maxNumberOfSavedGamesToShow) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.ShowSavedGamesUI_Bridge(title, maxNumberOfSavedGamesToShow); }
public void clearDefaultAccount() { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.clearDefaultAccount(); GooglePlayConnection.instance.disconnect(); }
public void Disconnect() { if (_State == GPConnectionState.STATE_DISCONNECTED || _State == GPConnectionState.STATE_CONNECTING) { return; } OnStateChange(GPConnectionState.STATE_DISCONNECTED); AN_GMSGeneralProxy.playServiceDisconnect(); }
public void SignOut() { if (_State == GPConnectionState.STATE_DISCONNECTED || _State == GPConnectionState.STATE_CONNECTING) { return; } OnStateChange(GPConnectionState.STATE_DISCONNECTED); AN_GMSGeneralProxy.signOut(); }
public void Resolve(GP_Snapshot snapshot) { if (snapshot.Equals(_s1)) { AN_GMSGeneralProxy.ResolveSnapshotsConflict_Bridge(0); } else { AN_GMSGeneralProxy.ResolveSnapshotsConflict_Bridge(1); } }
public void UpdatePlayerScoreLocal(GPLeaderBoard leaderboard) { if (!GooglePlayConnection.CheckState()) { return; } int requestId = SA_IdFactory.NextId; leaderboard.CreateScoreListener(requestId); AN_GMSGeneralProxy.loadLeaderboardInfoLocal(leaderboard.Id, requestId); }
public void SubmitScoreById(string leaderboardId, long score) { if (AndroidNativeSettings.Instance.Is_Leaderboards_Editor_Notifications_Enabled) { SA_EditorNotifications.ShowNotification(leaderboardId, score + " Scores Submitted", SA_EditorNotificationType.Achievement); } if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.submitScoreById(leaderboardId, score); }
public void RevealAchievementById(string achievementId) { if (AndroidNativeSettings.Instance.Is_Achievements_Editor_Notifications_Enabled) { SA_EditorNotifications.ShowNotification(achievementId, "Reveal Method Called", SA_EditorNotificationType.Achievement); } if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.revealAchievementById(achievementId); }
public void IncrementAchievementById(string achievementId, int numsteps) { if (AndroidNativeSettings.Instance.Is_Achievements_Editor_Notifications_Enabled) { SA_EditorNotifications.ShowNotification(achievementId, "Incremented " + numsteps + " Steps", SA_EditorNotificationType.Achievement); } if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.incrementAchievementById(achievementId, numsteps.ToString()); }
public void ResetLeaderBoard(string leaderboardId) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.resetLeaderBoard(leaderboardId); if (leaderBoards.ContainsKey(leaderboardId)) { leaderBoards.Remove(leaderboardId); } }
public void UnlockAchievement(string achievementName) { if (AndroidNativeSettings.Instance.Is_Achievements_Editor_Notifications_Enabled) { SA_EditorNotifications.ShowNotification(achievementName, "Unlock Method Called", SA_EditorNotificationType.Achievement); } if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.reportAchievement(achievementName); }
public void ResetLeaderBoard(string leaderboardId) { if (!GooglePlayConnection.CheckState()) { return; } AN_GMSGeneralProxy.resetLeaderBoard(leaderboardId); foreach (GPLeaderBoard lb in LeaderBoards) { if (lb.Id.Equals(leaderboardId)) { LeaderBoards.Remove(lb); return; } } }
public void resolveState(int stateKey, byte[] resolvedData, string resolvedVersion) { string b = ""; int len = resolvedData.Length; for (int i = 0; i < len; i++) { if (i != 0) { b += ","; } b += resolvedData[i].ToString(); } AN_GMSGeneralProxy.ResolveState(stateKey, b, resolvedVersion); }