hch
1 天以前 89fa96e505af9fe7baf676591222bfdb23b48262
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
using UnityEngine;
 
public class PhantasmPavilionWin : FunctionsBaseWin
{
    [SerializeField] RedpointBehaviour[] rpTabArr;
    [SerializeField] ImageEx imgModelBG;
    PhantasmPavilionManager manager { get { return PhantasmPavilionManager.Instance; } }
    protected override void OnPreOpen()
    {
        base.OnPreOpen();
        InitRedPoint();
        manager.UpdateRedPoint();
    }
 
    void InitRedPoint()
    {
        tabButtons[0].redpoint.redpointId = manager.GetRedpointId(PhantasmPavilionRepointType.Model);
        tabButtons[1].redpoint.redpointId = manager.GetRedpointId(PhantasmPavilionRepointType.Face);
        tabButtons[2].redpoint.redpointId = manager.GetRedpointId(PhantasmPavilionRepointType.Title);
    }
 
    protected override void OpenSubUIByTabIndex()
    {
        imgModelBG.SetActive(functionOrder == 0);
        switch (functionOrder)
        {
            case 0:
                //形象
                currentSubUI = UIManager.Instance.OpenWindow<PhantasmPavilionModelWin>();
                manager.nowType = PhantasmPavilionType.Model;
                break;
            case 1:
                //头像
                currentSubUI = UIManager.Instance.OpenWindow<PhantasmPavilionFaceWin>();
                manager.nowType = PhantasmPavilionType.Face;
                break;
            case 2:
                //称号
                currentSubUI = UIManager.Instance.OpenWindow<PhantasmPavilionTitleWin>();
                manager.nowType = PhantasmPavilionType.Title;
                break;
            default:
                Debug.LogWarning("未知的标签索引: " + functionOrder);
                break;
        }
    }
}