| 
using System; 
 | 
using System.Collections.Generic; 
 | 
  
 | 
public static class BattleConst 
 | 
{ 
 | 
    public static List<Type> BattleWindows = new List<Type>() 
 | 
    { 
 | 
        typeof(BattleWin), 
 | 
        typeof(StoryBossBattleWin), 
 | 
        typeof(ArenaBattleWin), 
 | 
        typeof(BoneFieldBattleWin), 
 | 
    }; 
 | 
  
 | 
    public static Dictionary<string, string> battleNameToWinName = new Dictionary<string, string>() 
 | 
    { 
 | 
        { "StoryBattleField", "BattleWin" }, 
 | 
        { "StoryBossBattleField", "StoryBossBattleWin" }, 
 | 
        { "ArenaBattleField", "ArenaBattleWin" }, 
 | 
        { "BoneBattleField", "BoneFieldBattleWin" }, 
 | 
    }; 
 | 
  
 | 
    public const int BattleStartEffectID = 1001; // Example effect ID for battle start 
 | 
  
 | 
    public const int skillMotionFps = 30; 
 | 
  
 | 
    public const int BattlePointItemID = 3;//战锤ID 
 | 
  
 | 
    public const int BattleTotalDamageType = 100001; // 总伤害类型ID 
 | 
  
 | 
    public const int BattleTotalRecoverType = 100002; // 总治疗类型ID 
 | 
  
 | 
  
 | 
    //  1000~10000之间的战斗层级 
 | 
    //  需要考虑根据UI 特效 战斗角色三方的层级关系 
 | 
    //  确立基本的层级范围 后往上累加 
 | 
    //  1.不能在BattleWin之下 否则就看不见了 
 | 
    //  2.处理EffectPenetrationBlocker的自动调整排序 
 | 
    //  3.要联动EffectConfig的前后的问题 
 | 
    //  BattleWin.Canvas.sortingOrder是最低值 
 | 
    //  还需要确立黑色的Mask的层级 
 | 
  
 | 
  
 | 
    //  UI界面|非激活英雄|挡板|激活英雄 
 | 
  
 | 
    // 非激活英雄后特效|非激活英雄|非激活英雄前 
 | 
  
 | 
    // 激活英雄后特效|激活英雄|激活英雄前特效 
 | 
  
 | 
    //  ---------------------2025、10.23更新 
 | 
    //  现在期望 蒙版不要压住UI 更改策略 
 | 
    //  释放技能英雄>受影响英雄>正常UI>黑色蒙版>未受影响英雄>底图 
 | 
  
 | 
    //  释放技能英雄>受影响英雄>正常UI>黑色蒙版>未受影响英雄>[底图] 
 | 
    public static int BattleBackgroundOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return  UnactiveHeroBackSortingOrder - 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    //释放技能英雄>受影响英雄>[正常UI]>黑色蒙版>未受影响英雄>底图 
 | 
    public static int BattleWinSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            List<int> activeWinOrders = new List<int>(); 
 | 
  
 | 
            for (int i = 0; i < BattleWindows.Count; i++) 
 | 
            { 
 | 
                var win = UIManager.Instance.GetUI(BattleWindows[i].Name); 
 | 
                if (win != null && win.IsActive()) 
 | 
                { 
 | 
                    activeWinOrders.Add(win.GetSortingOrder()); 
 | 
                } 
 | 
            } 
 | 
  
 | 
            if (activeWinOrders.Count == 0) 
 | 
            { 
 | 
                return 0; 
 | 
            } 
 | 
  
 | 
            int maxOrder = activeWinOrders[0]; 
 | 
            for (int i = 1; i < activeWinOrders.Count; i++) 
 | 
            { 
 | 
                if (activeWinOrders[i] > maxOrder) 
 | 
                { 
 | 
                    maxOrder = activeWinOrders[i]; 
 | 
                } 
 | 
            } 
 | 
  
 | 
            return maxOrder; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    //释放技能英雄>受影响英雄>正常UI>黑色蒙版>[未受影响英雄]>底图 
 | 
    // 非激活英雄的层级 
 | 
    public static int UnactiveHeroSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return BattleWinSortingOrder - 3; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    // 非激活英雄的后特效 
 | 
    public static int UnactiveHeroBackSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return UnactiveHeroSortingOrder - 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    // 非激活英雄的前特效 
 | 
    public static int UnactiveHeroFrontSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return UnactiveHeroSortingOrder + 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    //释放技能英雄>受影响英雄>正常UI>[黑色蒙版]>未受影响英雄>底图 
 | 
    // 黑色蒙版的层级 
 | 
    public static int BlockerSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return UnactiveHeroFrontSortingOrder + 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    //释放技能英雄>[受影响英雄]>正常UI>黑色蒙版>未受影响英雄>底图 
 | 
    // 激活英雄的层级 
 | 
    public static int ActiveHeroSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return BattleWinSortingOrder + 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
  
 | 
    // 激活英雄的后特效 
 | 
    public static int ActiveHeroBackSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return ActiveHeroSortingOrder - 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    // 激活英雄的前特效 
 | 
    public static int ActiveHeroFrontSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return ActiveHeroSortingOrder + 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
    //[释放技能英雄]>受影响英雄>正常UI>黑色蒙版>未受影响英雄>底图 
 | 
    //  释放技能钟的英雄层级 
 | 
    public static int ActiveHeroActionSortingOrder 
 | 
    { 
 | 
        get 
 | 
        { 
 | 
            return ActiveHeroFrontSortingOrder + 1; 
 | 
        } 
 | 
    } 
 | 
  
 | 
  
 | 
} 
 |