コード例 #1
0
ファイル: Local.cs プロジェクト: BlakeTriana/unity-decompiled
 void ISocialPlatform.LoadFriends(ILocalUser user, Action<bool> callback)
 {
   if (!this.VerifyUser())
     return;
   ((LocalUser) user).SetFriends((IUserProfile[]) this.m_Friends.ToArray());
   if (callback == null)
     return;
   callback(true);
 }
コード例 #2
0
ファイル: Local.cs プロジェクト: guozanhua/UnityDecompiled
		void ISocialPlatform.LoadFriends(ILocalUser user, Action<bool> callback)
		{
			if (!this.VerifyUser())
			{
				return;
			}
			((LocalUser)user).SetFriends(this.m_Friends.ToArray());
			if (callback != null)
			{
				callback(true);
			}
		}
コード例 #3
0
ファイル: LumosUsers.cs プロジェクト: GDxU/incomplete-richman
	/// <summary>
	/// Authenticates the given user.
	/// </summary>
	/// <param name="user">The user to authenticate.</param>
	/// <param name="callback">Callback.</param>
	public void Authenticate (ILocalUser user, Action<bool> callback)
	{
		user.Authenticate(
			success => {
				if (success) {
					_localUser = user as LumosUser;
				}

				if (callback != null) {
					callback(success);
				}
			});
	}
コード例 #4
0
 /// <summary>
 /// Authenticate the specified user and callback.
 /// </summary>
 /// <param name='user'>
 /// User.
 /// </param>
 /// <param name='callback'>
 /// Callback.
 /// </param>
 public void Authenticate(ILocalUser user, System.Action<bool> callback)
 {
     // Forward the AGSClient callbacks to the passed in callback.
     if(null != callback) {
         AGSClient.ServiceReadyEvent += () => {
             callback(true);
         };
         AGSClient.ServiceNotReadyEvent += (error) => { callback(false); };
     }
     // If using GameCircle with the Unity Social API,
     // initialize it with leaderboards and achievements, but not whispersync.
     AGSClient.Init(/*Leaderboards*/true,/*Achievements*/true,/*Whispersync*/false);
 }
コード例 #5
0
ファイル: Local.cs プロジェクト: BlakeTriana/unity-decompiled
 void ISocialPlatform.Authenticate(ILocalUser user, Action<bool> callback)
 {
   LocalUser localUser = (LocalUser) user;
   this.m_DefaultTexture = this.CreateDummyTexture(32, 32);
   this.PopulateStaticData();
   localUser.SetAuthenticated(true);
   localUser.SetUnderage(false);
   localUser.SetUserID("1000");
   localUser.SetUserName("Lerpz");
   localUser.SetImage(this.m_DefaultTexture);
   if (callback == null)
     return;
   callback(true);
 }
コード例 #6
0
ファイル: SaveGameIntegration.cs プロジェクト: mengtest/pew
		/// <summary>
		/// Shows the default save system UI. This allows user to select/delete saves as required.
		/// </summary>
		/// <param name="user">User.</param>
		/// <param name="callback">Invokes, when save game has been selected. Check for status for errors, or </param>
		public void ShowSaveSystemUI(ILocalUser user, Action<SelectUIStatus, ISavedGameMetadata> callback) {
			
			uint maxNumToDisplay = 1;
			bool allowCreateNew = true;
			bool allowDelete = true;
			
			ISavedGameClient savedGameClient = PlayGamesPlatform.Instance.SavedGame;
			
			if(savedGameClient != null) {
				
				savedGameClient.ShowSelectSavedGameUI(
					user.userName + "\u0027s saves",
					maxNumToDisplay,
					allowCreateNew,
					allowDelete,
					(SelectUIStatus status, ISavedGameMetadata saveGame) => {
						
						// some error occured, just show window again
						if (status != SelectUIStatus.SavedGameSelected) {
							ShowSaveSystemUI(user,callback);
							return;
						}
						
						if (callback != null) callback.Invoke(status, saveGame);
						
						if (OnSaveGameSelected != null && status == SelectUIStatus.SavedGameSelected) OnSaveGameSelected.Invoke();
					}
				);
				
			} else {
				
				// this is usually due to incorrect APP ID
				Debug.LogError("Save Game client is null...");
				
			}
			
		}
コード例 #7
0
 public virtual void UpdateProfile(string firstName, string parentEmail, IEnumerable <ILegalDocument> legal, ILocalUser localUser)
 {
     if (NetworkConfigIsNotSet)
     {
         throw new NullReferenceException("NetworkServicesConfig not set");
     }
     localUser.UpdateProfile(firstName, null, null, null, parentEmail, null, null, legal, onProfileUpdated);
 }
コード例 #8
0
 public void Authenticate(ILocalUser user, Action<bool> callback)
 {
     GPGLocalUser tUser = user as GPGLocalUser;
     tUser.Authenticate(callback);
 }
コード例 #9
0
ファイル: GPGSocial.cs プロジェクト: Anirban013/Tap-2-Bang
 public void LoadFriends(ILocalUser user, Action <bool> callback)
 {
 }
コード例 #10
0
 public void LoadFriends(ILocalUser user, Action <bool> callback)
 {
     throw new NotImplementedException();
 }
コード例 #11
0
 public void Authenticate(ILocalUser user, Action<bool, string> callback)
 {
     throw new NotImplementedException();
 }
コード例 #12
0
 /// <summary>
 /// Authenticate the local user with the Google Play Games service.
 /// </summary>
 /// <param name='localUser'>
 /// The local user. Must be <c>Social.localUser</c>.
 /// </param>
 /// <param name='callback'>
 /// The callback to call when authentication finishes. It will be called
 /// with <c>true</c> if authentication was successful, <c>false</c>
 /// otherwise.
 /// </param>
 public void Authenticate(ILocalUser localUser, Action <bool> callback)
 {
     Authenticate(localUser, callback, false);
 }
コード例 #13
0
ファイル: iOSLocalUser.cs プロジェクト: georgex1/rednit
 public iOSLocalUser()
 {
     // Initialize properties
     m_localUserData = Social.localUser;
 }
コード例 #14
0
ファイル: SocialExtension.cs プロジェクト: ArtReeX/memoria
 public static void ProcessCallbacks(this ILocalUser socialUser)
 {
     ((SteamLocalUser)socialUser).ProcessCallbacks();
 }
コード例 #15
0
 public static bool CheckPasswordHash <TUserId>(ILocalUser <TUserId> user, string password)
 => CheckPasswordHash(user.Password, user.Salt, password);
コード例 #16
0
 public override void UpdateProfile(string firstName, string parentEmail, IEnumerable <ILegalDocument> legal, ILocalUser localUser)
 {
     if (NetworkConfigIsNotSet)
     {
         throw new NullReferenceException("NetworkServicesConfig not set");
     }
     CoroutineRunner.StartPersistent(delayProfileUpdated(), this, "delay profile update");
 }
コード例 #17
0
 public void Authenticate(ILocalUser unused, Action <bool, string> callback)
 {
     Authenticate(callback, false, "auth error");
 }
コード例 #18
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 public void Authenticate(ILocalUser unused, Action <Boolean> callback)
 {
     this.Authenticate(callback);
 }
コード例 #19
0
 public OfflineSession(string userName)
 {
     this.userName = userName;
     localUser     = new OfflineLocalUser(userName);
 }
コード例 #20
0
ファイル: GameCircleSocial.cs プロジェクト: EJBQ/Bae-Zeus-X
 /// <summary>
 /// Loads the friends.
 /// </summary>
 /// <param name='user'>
 /// User.
 /// </param>
 /// <param name='callback'>
 /// Callback.
 /// </param>
 public void LoadFriends(ILocalUser user, System.Action<bool> callback)
 {
     if(user == null) {
         AGSClient.LogGameCircleError("LoadFriends \"user\" argument should not be null");
         return;
     }
     user.LoadFriends(callback);
 }
コード例 #21
0
 /// <summary>
 /// Authenticate the local user with the Google Play Games service.
 /// </summary>
 /// <param name='localUser'>
 /// The local user. Must be <c>Social.localUser</c>.
 /// </param>
 /// <param name='callback'>
 /// The callback to call when authentication finishes. It will be called
 /// with <c>true</c> if authentication was successful, <c>false</c>
 /// otherwise.
 /// </param>
 public void Authenticate(ILocalUser localUser, Action<bool> callback) {
     Authenticate(localUser, callback, false);
 }
コード例 #22
0
ファイル: GPGSocial.cs プロジェクト: Anirban013/Tap-2-Bang
        public void Authenticate(ILocalUser user, Action <bool> callback)
        {
            GPGLocalUser tUser = user as GPGLocalUser;

            tUser.Authenticate(callback);
        }
コード例 #23
0
        /// <summary>
        /// Authenticate the local user with the Google Play Games service.
        /// </summary>
        /// <param name='unused'>
        /// Unused. For future compatibility, always pass <c>Social.localUser</c>.
        /// </param>
        /// <param name='callback'>
        /// The callback to call when authentication finishes. It will be called
        /// with <c>true</c> if authentication was successful, <c>false</c>
        /// otherwise.
        /// </param>
        /// <param name='silent'>
        /// Indicates whether authentication should be silent. If <c>false</c>,
        /// authentication may show popups and interact with the user to obtain
        /// authorization. If <c>true</c>, there will be no popups or interaction with
        /// the user, and the authentication will fail instead if such interaction
        /// is required. A typical pattern is to try silent authentication on startup
        /// and, if that fails, present the user with a "Sign in" button that then
        /// triggers normal (not silent) authentication.
        /// </param>
        public void Authenticate(ILocalUser unused, Action<bool> callback, bool silent) {
            // make a platform-specific Play Games client
            mClient = PlayGamesClientFactory.GetPlatformPlayGamesClient();

            // authenticate!
            mClient.Authenticate(callback, silent);
        }
コード例 #24
0
 public void Authenticate(ILocalUser user, Action <bool, string> callback)
 {
     Authenticate(true, callback);
 }
コード例 #25
0
		private sealed virtual void UnityEngine.SocialPlatforms.ISocialPlatform.LoadFriends(ILocalUser user, Action<Boolean> callback){}
コード例 #26
0
        /// <summary>
        /// Authenticate the specified user.
        /// </summary>
        /// <param name="user">User.</param>
        /// <param name="callback">Callback.</param>
        /// <example>
        /// Example of usage:
        /// <code>
        /// CombuManager.platform.Authenticate (user, (bool success, string error) => {
        ///    Debug.Log("Authenticate: " + success + " -- " + error);
        /// });
        /// </code>
        /// </example>
        public virtual void Authenticate(ILocalUser user, System.Action <bool, string> callback)
        {
            string password = (user is User ? (user as User).password : "");

            Authenticate <User> (user.userName, password, callback);
        }
コード例 #27
0
 /// <summary>
 /// Same as <see cref="Authenticate(Action<bool>,bool)"/>. Provided for compatibility
 /// with ISocialPlatform.
 /// </summary>
 /// <param name="unused">Unused.</param>
 /// <param name="callback">Callback.</param>
 public void Authenticate(ILocalUser unused, Action <bool> callback)
 {
     Authenticate(callback, false);
 }
コード例 #28
0
		private sealed virtual void UnityEngine.SocialPlatforms.ISocialPlatform.Authenticate(ILocalUser user, Action<Boolean> callback){}
コード例 #29
0
 //Temporal fix for error on implementation
 public void Authenticate(ILocalUser x, Action <bool, string> callback)
 {
     //mPlatform.Authenticate(callback);
 }
コード例 #30
0
 void ISocialPlatform.Authenticate(ILocalUser user, Action <bool, string> callback)
 {
     GameCenterPlatform.s_AuthenticateCallback = callback;
     GameCenterPlatform.Authenticate();
 }
コード例 #31
0
ファイル: LumosUsers.cs プロジェクト: GDxU/incomplete-richman
	/// <summary>
	/// Loads the user's friends.
	/// </summary>
	/// <param name="user">User.</param>
	/// <param name="callback">Callback.</param>
	public void LoadFriends (ILocalUser user, Action<bool> callback)
	{
		user.LoadFriends(callback);
	}
コード例 #32
0
ファイル: SaveGameIntegration.cs プロジェクト: mengtest/pew
		/// <summary>
		/// Loads the saved game. This should be a starting point for loading data.
		/// </summary>
		/// <param name="user">User.</param>
		/// <param name="onSaveLoadedCallback">On save loaded callback.</param>
		public void LoadSavedGame(ILocalUser user, Action<SaveDataBundle> onSaveLoadedCallback) {
			
			if(onSaveLoadedCallback != null) OnSaveLoaded += onSaveLoadedCallback;
			
			if(m_saveBundleMetadata == null) {
				ShowSaveSystemUI(user, LoadGame);
			} else {
				LoadGame(SelectUIStatus.SavedGameSelected, m_saveBundleMetadata);
			}
			
		}
コード例 #33
0
 /// <summary>
 ///  Provided for compatibility with ISocialPlatform.
 /// </summary>
 /// <seealso cref="Authenticate(Action&lt;bool&gt;,bool)"/>
 /// <param name="unused">Unused.</param>
 /// <param name="callback">Callback.</param>
 public void Authenticate(ILocalUser unused, Action<bool> callback)
 {
     Authenticate(callback, false);
 }
コード例 #34
0
 /// <summary>
 /// Not implemented yet. Calls the callback with <c>false</c>.
 /// </summary>
 public void LoadFriends(ILocalUser user, Action<bool> callback)
 {
     Logger.w("PlayGamesPlatform.LoadFriends not implemented.");
     if (callback != null)
     {
         callback.Invoke(false);
     }
 }
コード例 #35
0
 void ISocialPlatform.Authenticate(ILocalUser user, System.Action <bool, string> callback)
 {
     ((ISocialPlatform)this).Authenticate(user, success => callback(success, null));
 }
コード例 #36
0
 public void RejectFriendInvitation(IIncomingFriendInvitation incomingFriendInvitation, ILocalUser localUser)
 {
     if (incomingFriendInvitation == null)
     {
         throw new ArgumentNullException("incomingFriendInvitation");
     }
     localUser.RejectFriendInvitation(incomingFriendInvitation, delegate(IRejectFriendInvitationResult result)
     {
         onRejectFriendInvitationSent(result, incomingFriendInvitation.Inviter.DisplayName.Text);
     });
 }
コード例 #37
0
 public void Authenticate(ILocalUser user, System.Action <bool> callback)
 {
     throw new System.NotImplementedException();
 }
コード例 #38
0
        /// <summary>
        /// Loads the friends that also play this game.  See loadConnectedPlayers.
        /// </summary>
        /// <param name="callback">Callback.</param>
        public void LoadFriends(ILocalUser user, Action<bool> callback)
        {
            if (!IsAuthenticated())
            {
                GooglePlayGames.OurUtils.Logger.e("LoadScores can only be called after authentication.");
                if (callback != null)
                {
                    callback(false);
                }
            }

            mClient.LoadFriends(callback);
        }
コード例 #39
0
ファイル: GameCircleSocial.cs プロジェクト: EJBQ/Bae-Zeus-X
 /// <summary>
 /// Authenticate the specified user and callback.
 /// </summary>
 /// <param name='user'>
 /// User.
 /// </param>
 /// <param name='callback'>
 /// Callback.
 /// </param>
 public void Authenticate(ILocalUser user, System.Action<bool> callback)
 {
     // Forward the AGSClient callbacks to the passed in callback.
     authenticationCallback = callback;
     // If using GameCircle with the Unity Social API,
     // initialize it with leaderboards and achievements, but not whispersync.
     AGSClient.Init(/*Leaderboards*/true,/*Achievements*/true,/*Whispersync*/false);
 }