Esempio n. 1
0
            public override void OnStateEnter()
            {
                base.OnStateEnter();

                UpdateBalanceSignal.Fire(SignalBus).Done(() =>
                {
                    SetBalanceSignal.Fire(SignalBus)
                    .Done(() =>
                    {
                        // TODO: Decide what to Do. For Now just getting on the start again.

                        Observable.Timer(TimeSpan.FromSeconds(Settings.ResultVisibilityTime))
                        .Subscribe(l => Model.RouletteState = ERouletteState.Setup)
                        .AddTo(Disposables);
                    },
                          exception =>
                    {
                        // TODO: Do something...
                        Debug.LogError($"Error: Something went wrong. {exception}");
                    });
                },
                                                         exception =>
                {
                    Debug.LogError($"Error: Something went wrong. {exception}");
                });
            }
Esempio n. 2
0
        public static IPromise Fire(SignalBus signalBus)
        {
            SetBalanceSignal signal = new SetBalanceSignal();

            signalBus.Fire(signal);
            return(signal.FireInternal());
        }
Esempio n. 3
0
 public void Execute(SetBalanceSignal signal)
 {
     _gameplayApi.SetPlayerBalance(_rouletteModel.Balance).Done(signal.Resolve, signal.Reject);
 }