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); }
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)); }
private void OnClick() { PageContainer.Of(transform).Push(ResourceKey.HomeLoadingPagePrefab(), true, false); }
private void OnShopButtonClicked() { PageContainer.Of(transform).Push(ResourceKey.ShopPagePrefab(), true); }
public override void DidPushEnter() { // Transition to "Home". PageContainer.Of(transform).Push(ResourceKey.HomePagePrefab(), true); }