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); }
void ISocialPlatform.LoadFriends(ILocalUser user, Action<bool> callback) { if (!this.VerifyUser()) { return; } ((LocalUser)user).SetFriends(this.m_Friends.ToArray()); if (callback != null) { callback(true); } }
/// <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); } }); }
/// <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); }
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); }
/// <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..."); } }
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); }
public void Authenticate(ILocalUser user, Action<bool> callback) { GPGLocalUser tUser = user as GPGLocalUser; tUser.Authenticate(callback); }
public void LoadFriends(ILocalUser user, Action <bool> callback) { }
public void LoadFriends(ILocalUser user, Action <bool> callback) { throw new NotImplementedException(); }
public void Authenticate(ILocalUser user, Action<bool, string> callback) { throw new NotImplementedException(); }
/// <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); }
public iOSLocalUser() { // Initialize properties m_localUserData = Social.localUser; }
public static void ProcessCallbacks(this ILocalUser socialUser) { ((SteamLocalUser)socialUser).ProcessCallbacks(); }
public static bool CheckPasswordHash <TUserId>(ILocalUser <TUserId> user, string password) => CheckPasswordHash(user.Password, user.Salt, password);
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"); }
public void Authenticate(ILocalUser unused, Action <bool, string> callback) { Authenticate(callback, false, "auth error"); }
public void Authenticate(ILocalUser unused, Action <Boolean> callback) { this.Authenticate(callback); }
public OfflineSession(string userName) { this.userName = userName; localUser = new OfflineLocalUser(userName); }
/// <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); }
/// <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); }
public void Authenticate(ILocalUser user, Action <bool> callback) { GPGLocalUser tUser = user as GPGLocalUser; tUser.Authenticate(callback); }
/// <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); }
public void Authenticate(ILocalUser user, Action <bool, string> callback) { Authenticate(true, callback); }
private sealed virtual void UnityEngine.SocialPlatforms.ISocialPlatform.LoadFriends(ILocalUser user, Action<Boolean> callback){}
/// <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); }
/// <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); }
private sealed virtual void UnityEngine.SocialPlatforms.ISocialPlatform.Authenticate(ILocalUser user, Action<Boolean> callback){}
//Temporal fix for error on implementation public void Authenticate(ILocalUser x, Action <bool, string> callback) { //mPlatform.Authenticate(callback); }
void ISocialPlatform.Authenticate(ILocalUser user, Action <bool, string> callback) { GameCenterPlatform.s_AuthenticateCallback = callback; GameCenterPlatform.Authenticate(); }
/// <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); }
/// <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); } }
/// <summary> /// Provided for compatibility with ISocialPlatform. /// </summary> /// <seealso cref="Authenticate(Action<bool>,bool)"/> /// <param name="unused">Unused.</param> /// <param name="callback">Callback.</param> public void Authenticate(ILocalUser unused, Action<bool> callback) { Authenticate(callback, false); }
/// <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); } }
void ISocialPlatform.Authenticate(ILocalUser user, System.Action <bool, string> callback) { ((ISocialPlatform)this).Authenticate(user, success => callback(success, null)); }
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); }); }
public void Authenticate(ILocalUser user, System.Action <bool> callback) { throw new System.NotImplementedException(); }
/// <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); }
/// <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); }