Inheritance: Local, ISocialPlatform
Esempio n. 1
0
 public void ShowAchievementsUI()
 {
     if (this.VerifyAuthentication())
     {
         GameCenterPlatform.Internal_ShowAchievementsUI();
     }
 }
Esempio n. 2
0
 private static void TriggerResetAchievementCallback(bool result)
 {
     if (GameCenterPlatform.s_ResetAchievements != null)
     {
         GameCenterPlatform.s_ResetAchievements(result);
     }
 }
Esempio n. 3
0
 public void ShowLeaderboardUI()
 {
     if (this.VerifyAuthentication())
     {
         GameCenterPlatform.Internal_ShowLeaderboardUI();
     }
 }
Esempio n. 4
0
 private static void PopulateLocalUser()
 {
     GameCenterPlatform.m_LocalUser.SetAuthenticated(GameCenterPlatform.GetAuthenticated());
     GameCenterPlatform.m_LocalUser.SetUserName(GameCenterPlatform.Internal_UserName());
     GameCenterPlatform.m_LocalUser.SetUserID(GameCenterPlatform.Internal_UserID());
     GameCenterPlatform.m_LocalUser.SetUnderage(GameCenterPlatform.GetIsUnderage());
     GameCenterPlatform.m_LocalUser.SetImage(GameCenterPlatform.GetUserImage());
 }
Esempio n. 5
0
        public void ShowAchievementsUI()
        {
            bool flag = !this.VerifyAuthentication();

            if (!flag)
            {
                GameCenterPlatform.Internal_ShowAchievementsUI();
            }
        }
Esempio n. 6
0
        public void ShowLeaderboardUI()
        {
            bool flag = !this.VerifyAuthentication();

            if (!flag)
            {
                GameCenterPlatform.Internal_ShowLeaderboardUI();
            }
        }
Esempio n. 7
0
 private static void AuthenticateCallbackWrapper(int result, string error)
 {
     GameCenterPlatform.PopulateLocalUser();
     if (GameCenterPlatform.s_AuthenticateCallback != null)
     {
         GameCenterPlatform.s_AuthenticateCallback(result == 1, error);
         GameCenterPlatform.s_AuthenticateCallback = null;
     }
 }
Esempio n. 8
0
 public static void ResetAllAchievements(Action <bool> callback)
 {
     GameCenterPlatform.s_ResetAchievements = callback;
     GameCenterPlatform.ResetAllAchievements();
     Debug.Log("ResetAllAchievements - no effect in editor");
     if (callback != null)
     {
         callback(true);
     }
 }
Esempio n. 9
0
 void ISocialPlatform.LoadFriends(ILocalUser user, Action <bool> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(false);
         }
     }
     else
     {
         GameCenterPlatform.LoadFriends(callback);
     }
 }
Esempio n. 10
0
 public void LoadScores(string category, Action <IScore[]> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(new Score[0]);
         }
     }
     else
     {
         GameCenterPlatform.InternalLoadScores(category, callback);
     }
 }
Esempio n. 11
0
 public void ReportScore(long score, string board, Action <bool> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(false);
         }
     }
     else
     {
         GameCenterPlatform.InternalReportScore(score, board, callback);
     }
 }
Esempio n. 12
0
 public void LoadAchievements(Action <IAchievement[]> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(new Achievement[0]);
         }
     }
     else
     {
         GameCenterPlatform.InternalLoadAchievements(callback);
     }
 }
Esempio n. 13
0
 public void ReportProgress(string id, double progress, Action <bool> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(false);
         }
     }
     else
     {
         GameCenterPlatform.InternalReportProgress(id, progress, callback);
     }
 }
Esempio n. 14
0
 public void LoadUsers(string[] userIds, Action <IUserProfile[]> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(new UserProfile[0]);
         }
     }
     else
     {
         GameCenterPlatform.Internal_LoadUsers(userIds, callback);
     }
 }
Esempio n. 15
0
        void ISocialPlatform.LoadFriends(ILocalUser user, Action <bool> callback)
        {
            bool flag = !this.VerifyAuthentication();

            if (flag)
            {
                bool flag2 = callback != null;
                if (flag2)
                {
                    callback(false);
                }
            }
            else
            {
                GameCenterPlatform.LoadFriends(callback);
            }
        }
Esempio n. 16
0
        public void LoadScores(string category, Action <IScore[]> callback)
        {
            bool flag = !this.VerifyAuthentication();

            if (flag)
            {
                bool flag2 = callback != null;
                if (flag2)
                {
                    IScore[] obj = new Score[0];
                    callback(obj);
                }
            }
            else
            {
                GameCenterPlatform.InternalLoadScores(category, callback);
            }
        }
Esempio n. 17
0
        public void LoadAchievements(Action <IAchievement[]> callback)
        {
            bool flag = !this.VerifyAuthentication();

            if (flag)
            {
                bool flag2 = callback != null;
                if (flag2)
                {
                    IAchievement[] obj = new Achievement[0];
                    callback(obj);
                }
            }
            else
            {
                GameCenterPlatform.InternalLoadAchievements(callback);
            }
        }
Esempio n. 18
0
        public void LoadUsers(string[] userIds, Action <IUserProfile[]> callback)
        {
            bool flag = !this.VerifyAuthentication();

            if (flag)
            {
                bool flag2 = callback != null;
                if (flag2)
                {
                    IUserProfile[] obj = new UserProfile[0];
                    callback(obj);
                }
            }
            else
            {
                GameCenterPlatform.Internal_LoadUsers(userIds, callback);
            }
        }
Esempio n. 19
0
	void InitializeSettings ()
	{
		// For now Social settings are only used for Game Center.
		if (Application.platform == RuntimePlatform.IPhonePlayer) {
			var settings = LumosPowerups.powerups["social"].settings;
			var gameCenterKey = "use_game_center";

			if (settings != null && settings.ContainsKey(gameCenterKey)) {
				useGameCenter = System.Convert.ToBoolean(settings[gameCenterKey]);
			}

			if (useGameCenter) {
				gameCenterPlatform = new GameCenterPlatform();

				gameCenterPlatform.localUser.Authenticate(success => {
					if (success) {
						LumosUnity.Debug.Log("Authenticated with game center.");
					}
				});
			}
		}
	}
Esempio n. 20
0
 public static void ShowLeaderboardUI(string leaderboardID, TimeScope timeScope)
 {
     GameCenterPlatform.ShowSpecificLeaderboardUI(leaderboardID, (int)timeScope);
     Debug.Log("ShowLeaderboardUI - no effect in editor");
 }
Esempio n. 21
0
 public static void ShowDefaultAchievementCompletionBanner(bool value)
 {
     GameCenterPlatform.ShowDefaultAchievementBanner(value);
     Debug.Log("ShowDefaultAchievementCompletionBanner - no effect in editor");
 }
Esempio n. 22
0
 private static void ClearFriends(int size)
 {
     GameCenterPlatform.SafeClearArray(ref GameCenterPlatform.s_friends, size);
 }
Esempio n. 23
0
 private static void SetUserImage(Texture2D texture, int number)
 {
     GameCenterPlatform.SafeSetUserImage(ref GameCenterPlatform.s_users, texture, number);
 }
Esempio n. 24
0
 private static void ClearUsers(int size)
 {
     GameCenterPlatform.SafeClearArray(ref GameCenterPlatform.s_users, size);
 }
Esempio n. 25
0
 void ISocialPlatform.Authenticate(ILocalUser user, Action <bool, string> callback)
 {
     GameCenterPlatform.s_AuthenticateCallback = callback;
     GameCenterPlatform.Authenticate();
 }