using System; using System.Collections.Generic; using Activity.HomeEntranceBtn; using Capsule.Pack.Manager; using Capsule.Pack.UIPanel; using GameCore; using UnityEngine; namespace Capsule.Pack { public class IceCapsuleEntranceButton : AbstractHomeEntranceBtn { protected override Type AssociatedSentryType => typeof(CapsulePackSentry); protected override async void OnClickBtn() { try { UITypes.CapsulePackPanel.SetType(Data?.MainConfig.UIPanel); var obj =await UIManager.Instance.ShowUILoad(UITypes.CapsulePackPanel); obj.GetComponent()?.SetData(_manager as CapsulePackManager); } catch (Exception e) { Debug.LogError(e); } } protected override string GetIconName() { return Data?.MainConfig?.Icon; } protected override List GetResourceNames() { var mainConfig = Data?.MainConfig; if (mainConfig == null) return null; return new List { mainConfig.UIPanel, mainConfig.Icon,"OfferCapsuleRewardsProbabilityPopupPanel" }; } } }