public PageState <TPage> ReduceReset(PageState <TPage> pageState, SceneState <TScene> sceneState, ResetAction action) { pageState.Stack.Clear(); SceneDuck <TScene> .Remove(sceneState, config.GetPageScenes()); pageState.SetStateChanged(); return(pageState); }
public PageState <TPage> ReduceAdjust(PageState <TPage> pageState, SceneState <TScene> sceneState) { SceneDuck <TScene> .Remove(sceneState, config.GetPageScenes()); if (pageState.Stack.Any()) { var page = pageState.Current.Page; if (!config.PageMap.ContainsKey(page)) { Debug.LogWarning( "Page adjust failed. Missing configuration in SceneConfig.PageMap: " + page); } var scenes = config.PageMap[page]; SceneDuck <TScene> .Add(sceneState, scenes); } sceneState.SetStateChanged(); return(pageState); }