public static Promise CreateUserData(SignalBus signalBus, UserData userData)
        {
            CreateUserDataSignal signal = new CreateUserDataSignal();

            signal.UserData      = userData;
            signal.OnUserCreated = new Promise();

            signalBus.Fire(signal);

            return(signal.OnUserCreated);
        }
Example #2
0
            public override void OnStateEnter()
            {
                base.OnStateEnter();

                UserData userData = GameSettings.DefaultGameState.User;

                CreateUserDataSignal.CreateUserData(SignalBus, userData).Then(
                    () => {
                    _remoteDataModel.SeedUserData(userData);
                    BootstrapModel.LoadingProgress.Value = BootstrapModel.ELoadingProgress.LoadHud;
                }
                    ).Catch(e =>
                {
                    Debug.LogError("Exception Creating new User: " + e.ToString());
                });
            }