hch
8 天以前 303f5970d2bef26905c9d6d471cd13f41bc722a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
/// <summary>
/// 武将基础界面
/// </summary>
public class HeroBaseWin : FunctionsBaseWin
{
    [SerializeField] Button callBtn;
 
    /// </summary>
    protected override void InitComponent()
    {
        base.InitComponent();
 
        //招募为另外一个界面,避免关闭时显示空白
        callBtn.AddListener(()=>
        { 
            //打开招募界面
            UIManager.Instance.OpenWindow<HeroCallWin>();
        });
    }
 
 
    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<HeroListWin>();
                break;
            case 1:
                //currentSubUI = UIManager.Instance.OpenWindow<HeroCollectionsWin>();
                break;
            case 2:
                break;
            default:
                Debug.LogWarning("未知的标签索引: " + functionOrder);
                break;
        }
    }
}