Beispiel #1
0
        public async UniTask PushAsync(IPageTransition transition)
        {
            var nextPage = await transition.LoadPageAsync();

            await nextPage.Initialize();

            pages.Add(nextPage);
        }
Beispiel #2
0
        public async UniTask ReplaceAsync(IPageTransition transition)
        {
            var currentPage = pages.Last();

            currentPage.Resume();
            currentPage.Discard();
            pages.Remove(currentPage);
            var nextPage = await transition.LoadPageAsync();

            await nextPage.Initialize();

            pages.Add(nextPage);
        }
Beispiel #3
0
        public async UniTask ReplaceAllAsync(IPageTransition transition)
        {
            foreach (var currentPage in pages)
            {
                currentPage.Resume();
                currentPage.Discard();
            }
            pages.Clear();
            var nextPage = await transition.LoadPageAsync();

            await nextPage.Initialize();

            pages.Add(nextPage);
        }