Example #1
0
 public override IEnumerator Cleanup()
 {
     _settingButton.onClick.RemoveListener(OnSettingButtonClicked);
     _shopButton.onClick.RemoveListener(OnShopButtonClicked);
     PageContainer.Of(transform).ReleasePreloaded(ResourceKey.ShopPagePrefab());
     yield break;
 }
        private void OnClick()
        {
            var pageContainer = string.IsNullOrEmpty(_containerName)
                ? PageContainer.Of(transform)
                : PageContainer.Find(_containerName);

            pageContainer.Pop(_playAnimation);
        }
Example #3
0
        public override IEnumerator Initialize()
        {
            _settingButton.onClick.AddListener(OnSettingButtonClicked);
            _shopButton.onClick.AddListener(OnShopButtonClicked);

            // Preload the "Shop" page prefab.
            yield return(PageContainer.Of(transform).Preload(ResourceKey.ShopPagePrefab()));

            // Simulate loading time.
            yield return(new WaitForSeconds(1.0f));
        }
Example #4
0
 private void OnClick()
 {
     PageContainer.Of(transform).Push(ResourceKey.HomeLoadingPagePrefab(), true, false);
 }
Example #5
0
 private void OnShopButtonClicked()
 {
     PageContainer.Of(transform).Push(ResourceKey.ShopPagePrefab(), true);
 }
 public override void DidPushEnter()
 {
     // Transition to "Home".
     PageContainer.Of(transform).Push(ResourceKey.HomePagePrefab(), true);
 }