| | |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | public static class BattleConst |
| | | { |
| | | public static List<Type> BattleWindows = new List<Type>() |
| | | { |
| | | typeof(BattleWin), |
| | | typeof(StoryBossBattleWin), |
| | | typeof(BoneFieldWin), |
| | | }; |
| | | |
| | | public const int BattleStartEffectID = 1001; // Example effect ID for battle start |
| | | |
| | | public const int skillMotionFps = 30; |
| | |
| | | { |
| | | get |
| | | { |
| | | List<int> activeWinOrders = new List<int>(); |
| | | |
| | | BattleWin battleWin = UIManager.Instance.GetUI<BattleWin>(); |
| | | if (battleWin != null) |
| | | for (int i = 0; i < BattleWindows.Count; i++) |
| | | { |
| | | return battleWin.GetSortingOrder(); |
| | | } |
| | | StoryBossBattleWin fsBattleWin = UIManager.Instance.GetUI<StoryBossBattleWin>(); |
| | | if (fsBattleWin != null) |
| | | var win = UIManager.Instance.GetUI(BattleWindows[i].Name); |
| | | if (win != null && win.IsActive()) |
| | | { |
| | | return fsBattleWin.GetSortingOrder(); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | // 非激活英雄的层级 |