41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
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<CapsulePackData>
|
|
{
|
|
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<CapsulePackPanel>()?.SetData(_manager as CapsulePackManager);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Debug.LogError(e);
|
|
}
|
|
}
|
|
|
|
protected override string GetIconName()
|
|
{
|
|
return Data?.MainConfig?.Icon;
|
|
}
|
|
|
|
protected override List<string> GetResourceNames()
|
|
{
|
|
var mainConfig = Data?.MainConfig;
|
|
if (mainConfig == null) return null;
|
|
return new List<string> { mainConfig.UIPanel, mainConfig.Icon,"OfferCapsuleRewardsProbabilityPopupPanel" };
|
|
}
|
|
}
|
|
} |