少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-12 4493647b726de207f4628a7cce86d75ebb73ddea
3335 重构窗口管理
7个文件已修改
120 ■■■■ 已修改文件
System/Dungeon/DungeonDefeatedWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonFightWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonVictoryWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/JadeDynastyTower/JadeDynastyTowerModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainInterfaceWin.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RuneTower/RuneTowerModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/PopupWindowsProcessor.cs 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonDefeatedWin.cs
@@ -59,7 +59,7 @@
            if (iceCrystalVeinModel.IsIceCrystalVein_Copy)
            {
                iceCrystalVeinModel.IsIceCrystalVein_Copy = false;
                iceCrystalVeinModel.IsIceCrystalVeinCopy = true;
                PopupWindowsProcessor.Instance.Add("IceCrystalVeinWin");
            }
        }
System/Dungeon/DungeonFightWin.cs
@@ -172,7 +172,7 @@
            if (iceCrystalVeinModel.IsIceCrystalVein_Copy)
            {
                iceCrystalVeinModel.IsIceCrystalVein_Copy = false;
                iceCrystalVeinModel.IsIceCrystalVeinCopy = true;
                PopupWindowsProcessor.Instance.Add("IceCrystalVeinWin");
            }
        }
System/Dungeon/DungeonVictoryWin.cs
@@ -118,7 +118,7 @@
            if (iceCrystalVeinModel.IsIceCrystalVein_Copy)
            {
                iceCrystalVeinModel.IsIceCrystalVein_Copy = false;
                iceCrystalVeinModel.IsIceCrystalVeinCopy = true;
                PopupWindowsProcessor.Instance.Add("IceCrystalVeinWin");
            }
        }
System/JadeDynastyTower/JadeDynastyTowerModel.cs
@@ -134,6 +134,7 @@
            if (specialUnLockFloor == 0)
            {
                openJadeDynastyTower = true;
                PopupWindowsProcessor.Instance.Add("TowerWin",1);
            }
        }
@@ -188,6 +189,7 @@
                if (config.unLockEquipPlace > 0)
                {
                    specialUnLockFloor = highestPassFloor;
                    PopupWindowsProcessor.Instance.Add("JadeDynastyTowerUnLockWin");
                }
            }
        }
System/MainInterfacePanel/MainInterfaceWin.cs
@@ -666,54 +666,7 @@
                }
            }
            if (runeTowerModel.newPassFloor > 0 && !IsDungeon())
            {
                if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
                {
                    if (!WindowCenter.Instance.IsOpen("RuneNewGotWin"))
                    {
                        WindowCenter.Instance.Open<RuneNewGotWin>();
                    }
                }
            }
            if (jadeDynastyTowerModel.specialUnLockFloor > 0 && !IsDungeon())
            {
                if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
                {
                    if (!WindowCenter.Instance.IsOpen("JadeDynastyTowerUnLockWin"))
                    {
                        WindowCenter.Instance.Open<JadeDynastyTowerUnLockWin>();
                    }
                }
            }
            if (jadeDynastyTowerModel.openJadeDynastyTower && !IsDungeon())
            {
                if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
                {
                    if (!WindowCenter.Instance.IsOpen("TowerWin"))
                    {
                        WindowCenter.Instance.Open<TowerWin>(false, 1);
                        jadeDynastyTowerModel.openJadeDynastyTower = false;
                    }
                }
            }
            if (iceCrystalVeinModel.IsIceCrystalVeinCopy && !IsDungeon())//是否再次打开冰晶矿脉面板
            {
                if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
                {
                    if (!WindowCenter.Instance.IsOpen("IceCrystalVeinWin"))
                    {
                        WindowCenter.Instance.Open<IceCrystalVeinWin>();
                    }
                    iceCrystalVeinModel.IsIceCrystalVeinCopy = false;
                }
            }
        }
        public void FriendQuestBtn()
        {
System/RuneTower/RuneTowerModel.cs
@@ -358,6 +358,7 @@
                if (config.UnLockRune > 0)
                {
                    newPassFloor = (int)runeModel.RuneTowerOpenLV;
                    PopupWindowsProcessor.Instance.Add("RuneNewGotWin");
                }
                if (!allTowerCompleted && config.TowerId != currentTower)
System/WindowBase/PopupWindowsProcessor.cs
@@ -5,17 +5,37 @@
public class PopupWindowsProcessor : SingletonMonobehaviour<PopupWindowsProcessor>
{
    List<string> popupWindowQueue = new List<string>();
    string currentWindow = string.Empty;
    List<PopupWindow> popupWindowQueue = new List<PopupWindow>();
    PopupWindow currentWindow;
    public void Add(string name)
    public void Add(string name, int functionId = 0)
    {
        popupWindowQueue.Add(name);
        var popupWindow = new PopupWindow()
        {
            window = name,
            functionId = functionId,
        };
        if (popupWindowQueue.Contains(popupWindow))
        {
            popupWindowQueue.Remove(popupWindow);
        }
        popupWindowQueue.Add(popupWindow);
    }
    public void Remove(string name)
    public void Remove(string name, int functionId = 0)
    {
        popupWindowQueue.Remove(name);
        var popupWindow = new PopupWindow()
        {
            window = name,
            functionId = functionId,
        };
        if (popupWindowQueue.Contains(popupWindow))
        {
            popupWindowQueue.Remove(popupWindow);
        }
    }
    private void LateUpdate()
@@ -50,16 +70,42 @@
            return;
        }
        if (!string.IsNullOrEmpty(currentWindow))
        if (currentWindow != default(PopupWindow))
        {
            if (!WindowCenter.Instance.IsOpen(currentWindow)
            if (!WindowCenter.Instance.IsOpen(currentWindow.window)
                && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin())
            {
                currentWindow = popupWindowQueue[0];
                popupWindowQueue.RemoveAt(0);
                WindowCenter.Instance.Open(currentWindow);
                WindowCenter.Instance.Open(currentWindow.window, false, currentWindow.functionId);
            }
        }
        else
        {
            if (!WindowCenter.Instance.ExistAnyFullScreenOrMaskWin())
            {
                currentWindow = popupWindowQueue[0];
                popupWindowQueue.RemoveAt(0);
                WindowCenter.Instance.Open(currentWindow.window, false, currentWindow.functionId);
            }
        }
    }
    public struct PopupWindow
    {
        public string window;
        public int functionId;
        public static bool operator ==(PopupWindow lhs, PopupWindow rhs)
        {
            return lhs.window == rhs.window && lhs.functionId == rhs.functionId;
        }
        public static bool operator !=(PopupWindow lhs, PopupWindow rhs)
        {
            return lhs.window != rhs.window || lhs.functionId != rhs.functionId;
        }
    }