Пример #1
0
 void UpdateScene(State state)
 {
     if (state.Scene.NeedsAdjust(config.GetPageScenes(), config.PageMap[state.Page.Current.Page]))
     {
         Unidux.Dispatch(PageDuck <Page, Scene> .ActionCreator.Adjust());
     }
 }
Пример #2
0
 void Start()
 {
     this.GetComponent <Button>().OnClickAsObservable()
     .Select(_ => PageDuck <Page, Scene> .ActionCreator.Push(Page.TitlePage))
     .Subscribe(action => Unidux.Dispatch(action))
     .AddTo(this);
 }
Пример #3
0
 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);
 }
Пример #4
0
 void Start()
 {
     Unidux.Dispatch(PageDuck <Page, Scene> .ActionCreator.Reset());
     Unidux.Dispatch(PageDuck <Page, Scene> .ActionCreator.Push(Page.TitlePage));
 }