using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
///
/// 武将基础界面
///
public class HeroBaseWin : FunctionsBaseWin
{
[SerializeField] Button callBtn;
///
protected override void InitComponent()
{
base.InitComponent();
//招募为另外一个界面,避免关闭时显示空白
callBtn.AddListener(()=>
{
//打开招募界面
UIManager.Instance.OpenWindow();
});
}
protected override void OnPreOpen()
{
base.OnPreOpen();
tabButtons[functionOrder].SelectBtn(true);
}
protected override void OnPreClose()
{
base.OnPreClose();
}
public override void Refresh()
{
}
protected override void OpenSubUIByTabIndex()
{
Debug.Log("打开子界面 : " + functionOrder);
// 主城 内政 武将 挑战 公会
//根据索引打开不同的界面
switch (functionOrder)
{
case 0:
currentSubUI = UIManager.Instance.OpenWindow();
break;
case 1:
currentSubUI = UIManager.Instance.OpenWindow();
break;
case 2:
break;
default:
Debug.LogWarning("未知的标签索引: " + functionOrder);
break;
}
}
}