void UpdateScene(State state) { if (state.Scene.NeedsAdjust(config.GetPageScenes(), config.PageMap[state.Page.Current.Page])) { Unidux.Dispatch(PageDuck <Page, Scene> .ActionCreator.Adjust()); } }
void Start() { this.GetComponent <Button>().OnClickAsObservable() .Select(_ => PageDuck <Page, Scene> .ActionCreator.Push(Page.TitlePage)) .Subscribe(action => Unidux.Dispatch(action)) .AddTo(this); }
void Start() { this.GetComponent <Button>().OnClickAsObservable() .Select(_ => PageDuck <Page, Scene> .ActionCreator.Push(Page.ResultPage, new ResultPageData(Random.Range(0, 101)))) .Subscribe(action => Unidux.Dispatch(action)) .AddTo(this); }
void Start() { Unidux.Dispatch(PageDuck <Page, Scene> .ActionCreator.Reset()); Unidux.Dispatch(PageDuck <Page, Scene> .ActionCreator.Push(Page.TitlePage)); }