예제 #1
0
파일: User.cs 프로젝트: njelly/TofuCCG-Old
 public static UserModel CreateNewUserModel()
 {
     return(new UserModel
     {
         id = SystemInfo.deviceUniqueIdentifier,
         playFabAccountData = PlayFabAccountData.CreateEmpty(),
     });
 }
예제 #2
0
        // --------------------------------------------------------------------------------------------
        /// <summary>
        /// Log in to the local player's account.
        /// </summary>
        public void LogIn(AccountAuthenticationManager.AuthenticationSuccessDelegate onSuccess, AccountAuthenticationManager.AuthenticationFailureDelegate onFailure)
        {
            _authenticationManager = new PlayFabAccountAuthenticationManager(
                new List <SessionProvider>
            {
                new UnityDeviceIdSessionProvider()
            },
                SystemInfo.deviceUniqueIdentifier,
                AppConsts.PlayFab.TitleID);

            _authenticationManager.Authenticate(() =>
            {
                _accountData = _authenticationManager.AccountData;
                AuthenticatedSuccessfully?.Invoke(this, new AuthenticatedSuccessfullyEventArgs(_accountData));
                onSuccess();
            }, (TofuErrorCode errorCode, string errorMessage) =>
            {
                FailedToAuthenticate?.Invoke(this, EventArgs.Empty);
                onFailure(errorCode, errorMessage);
            });
        }
예제 #3
0
 public AppStartupControllerCompletedEventArgs(bool successful, PlayFabAccountData accountData) : base(successful)
 {
     this.accountData = accountData;
 }
예제 #4
0
 public AuthenticatedSuccessfullyEventArgs(PlayFabAccountData accountData)
 {
     this.accountData = accountData;
 }