| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using UnityEngine.Events; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | public class GiftBaseCell : MonoBehaviour |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | UIManager.Instance.OpenWindow<SmallTipWin>(); |
| | | UIManager.Instance.OpenWindowAsync<SmallTipWin>().Forget(); |
| | | |
| | | } |
| | | else if (giftID == 0) |
| | | { |
| | | SmallTipWin.showText = Language.Get("HeroGift1"); |
| | | UIManager.Instance.OpenWindow<SmallTipWin>(); |
| | | UIManager.Instance.OpenWindowAsync<SmallTipWin>().Forget(); |
| | | } |
| | | else if (giftID == -1) |
| | | { |
| | | SmallTipWin.showText = Language.Get("HeroGift2", HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(heroID, index)); |
| | | UIManager.Instance.OpenWindow<SmallTipWin>(); |
| | | UIManager.Instance.OpenWindowAsync<SmallTipWin>().Forget(); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | GameObject cellContainer; |
| | | protected void LoadPrefab() |
| | | protected async UniTask LoadPrefab() |
| | | { |
| | | if (cellContainer != null) |
| | | return; |
| | |
| | | } |
| | | if (cellContainer == null) |
| | | { |
| | | cellContainer = UIUtility.CreateWidget("GiftBaseCell", "Container_GiftCell"); |
| | | cellContainer = await UIUtility.CreateWidget("GiftBaseCell", "Container_GiftCell"); |
| | | |
| | | if (this == null) |
| | | { |
| | | if (null != cellContainer) |
| | | { |
| | | GameObject.DestroyImmediate(cellContainer); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if (cellContainer != null) |
| | | { |