Наследование: Local, ISocialPlatform
Пример #1
0
 public void ShowAchievementsUI()
 {
     if (this.VerifyAuthentication())
     {
         GameCenterPlatform.Internal_ShowAchievementsUI();
     }
 }
Пример #2
0
 private static void TriggerResetAchievementCallback(bool result)
 {
     if (GameCenterPlatform.s_ResetAchievements != null)
     {
         GameCenterPlatform.s_ResetAchievements(result);
     }
 }
Пример #3
0
 public void ShowLeaderboardUI()
 {
     if (this.VerifyAuthentication())
     {
         GameCenterPlatform.Internal_ShowLeaderboardUI();
     }
 }
Пример #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());
 }
Пример #5
0
        public void ShowAchievementsUI()
        {
            bool flag = !this.VerifyAuthentication();

            if (!flag)
            {
                GameCenterPlatform.Internal_ShowAchievementsUI();
            }
        }
Пример #6
0
        public void ShowLeaderboardUI()
        {
            bool flag = !this.VerifyAuthentication();

            if (!flag)
            {
                GameCenterPlatform.Internal_ShowLeaderboardUI();
            }
        }
Пример #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;
     }
 }
Пример #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);
     }
 }
Пример #9
0
 void ISocialPlatform.LoadFriends(ILocalUser user, Action <bool> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(false);
         }
     }
     else
     {
         GameCenterPlatform.LoadFriends(callback);
     }
 }
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #12
0
 public void LoadAchievements(Action <IAchievement[]> callback)
 {
     if (!this.VerifyAuthentication())
     {
         if (callback != null)
         {
             callback(new Achievement[0]);
         }
     }
     else
     {
         GameCenterPlatform.InternalLoadAchievements(callback);
     }
 }
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #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.");
					}
				});
			}
		}
	}
Пример #20
0
 public static void ShowLeaderboardUI(string leaderboardID, TimeScope timeScope)
 {
     GameCenterPlatform.ShowSpecificLeaderboardUI(leaderboardID, (int)timeScope);
     Debug.Log("ShowLeaderboardUI - no effect in editor");
 }
Пример #21
0
 public static void ShowDefaultAchievementCompletionBanner(bool value)
 {
     GameCenterPlatform.ShowDefaultAchievementBanner(value);
     Debug.Log("ShowDefaultAchievementCompletionBanner - no effect in editor");
 }
Пример #22
0
 private static void ClearFriends(int size)
 {
     GameCenterPlatform.SafeClearArray(ref GameCenterPlatform.s_friends, size);
 }
Пример #23
0
 private static void SetUserImage(Texture2D texture, int number)
 {
     GameCenterPlatform.SafeSetUserImage(ref GameCenterPlatform.s_users, texture, number);
 }
Пример #24
0
 private static void ClearUsers(int size)
 {
     GameCenterPlatform.SafeClearArray(ref GameCenterPlatform.s_users, size);
 }
Пример #25
0
 void ISocialPlatform.Authenticate(ILocalUser user, Action <bool, string> callback)
 {
     GameCenterPlatform.s_AuthenticateCallback = callback;
     GameCenterPlatform.Authenticate();
 }