yyl
2025-09-15 ee791f4c389d9a3f45f32532521eb20efd0d8a9a
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
 
 
public static class BattleConst
{
    public const int BattleStartEffectID = 1001; // Example effect ID for battle start
 
    public const int skillMotionFps = 30;
 
    public const int BattlePointItemID = 3;//战锤ID
 
 
    //  1000~10000之间的战斗层级
    //  需要考虑根据UI 特效 战斗角色三方的层级关系
    //  确立基本的层级范围 后往上累加
    //  1.不能在BattleWin之下 否则就看不见了
    //  2.处理EffectPenetrationBlocker的自动调整排序
    //  3.要联动EffectConfig的前后的问题
    //  BattleWin.Canvas.sortingOrder是最低值
    //  还需要确立黑色的Mask的层级
 
 
    //  UI界面|非激活英雄|挡板|激活英雄
 
    // 非激活英雄后特效|非激活英雄|非激活英雄前
 
    // 激活英雄后特效|激活英雄|激活英雄前特效
 
    public const int BattleBlackTransparentMaskOffset = 100;
 
 
    public static int BattleWinSortingOrder
    {
        get
        {
 
            BattleWin battleWin = UIManager.Instance.GetUI<BattleWin>();
            if (battleWin != null)
            {
                return battleWin.GetSortingOrder();
            }
            return 0;
        }
    }
 
    // 非激活英雄的层级
    public static int UnactiveHeroSortingOrder
    {
        get
        {
            return BattleWinSortingOrder + BattleBlackTransparentMaskOffset - 50;
        }
    }
 
    // 非激活英雄的后特效
    public static int UnactiveHeroBackSortingOrder
    {
        get
        {
            return UnactiveHeroSortingOrder - 1;
        }
    }
 
    // 非激活英雄的前特效
    public static int UnactiveHeroFrontSortingOrder
    {
        get
        {
            return UnactiveHeroSortingOrder + 1;
        }
    }
 
    // 挡板的层级
    public static int BlockerSortingOrder
    {
        get
        {
            return UnactiveHeroFrontSortingOrder + 1;
        }
    }
 
    // 激活英雄的层级
    public static int ActiveHeroSortingOrder
    {
        get
        {
            return BattleWinSortingOrder + BattleBlackTransparentMaskOffset + 50;
        }
    }
 
    // 激活英雄的后特效
    public static int ActiveHeroBackSortingOrder
    {
        get
        {
            return ActiveHeroSortingOrder - 1;
        }
    }
 
    // 激活英雄的前特效
    public static int ActiveHeroFrontSortingOrder
    {
        get
        {
            return ActiveHeroSortingOrder + 1;
        }
    }
}