using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
public class HeroBestBaseWin : OneLevelWin
|
{
|
|
|
protected override void OpenSubUIByTabIndex()
|
{
|
ShowSkinBtn();
|
switch (functionOrder)
|
{
|
case 0:
|
|
currentSubUI = UIManager.Instance.OpenWindow<HeroBestWin>();
|
|
if (GetSortingOrder() < currentSubUI.GetSortingOrder())
|
{
|
SetSortingOrder(currentSubUI.GetSortingOrder() + 1);
|
}
|
break;
|
|
case 1:
|
//皮肤 图鉴界面打开的传1
|
currentSubUI = UIManager.Instance.OpenWindow<HeroSkinWin>(1);
|
|
if (GetSortingOrder() < currentSubUI.GetSortingOrder())
|
{
|
SetSortingOrder(currentSubUI.GetSortingOrder() + 1);
|
}
|
break;
|
default:
|
Debug.LogWarning("未知的标签索引: " + functionOrder);
|
break;
|
}
|
|
}
|
|
//有的武将没有皮肤
|
public void ShowSkinBtn()
|
{
|
if (HeroUIManager.Instance.selectForPreviewHeroID == 0)
|
{
|
return;
|
}
|
var config = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID);
|
tabButtons[1].SetActive(config.SkinIDList.Length > 1);
|
}
|
|
void LateUpdate()
|
{
|
if (currentSubUI == null) return;
|
if (GetSortingOrder() < currentSubUI.GetSortingOrder())
|
{
|
SetSortingOrder(currentSubUI.GetSortingOrder() + 1);
|
}
|
}
|
}
|