From 48c963425709dcd449fa5bc98049d2393dfd56ef Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 27 八月 2018 15:43:31 +0800
Subject: [PATCH] 2948 移除多个子界面动画

---
 UI/Common/WindowConfig.cs |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/UI/Common/WindowConfig.cs b/UI/Common/WindowConfig.cs
index d283396..316b376 100644
--- a/UI/Common/WindowConfig.cs
+++ b/UI/Common/WindowConfig.cs
@@ -7,7 +7,9 @@
 public class WindowConfig : ScriptableObject
 {
 
-    public WindowTable[] windows;
+    public WindowTable[] windows;
+    public Dictionary<string, List<string>> parentChildrenTable = new Dictionary<string, List<string>>();
+    public List<string> childWindows = new List<string>();
 
     static WindowConfig config;
     public static WindowConfig Get()
@@ -15,11 +17,21 @@
         if (config == null)
         {
             config = Resources.Load<WindowConfig>("ScriptableObject/Config/WindowConfig");
+            for (int i = 0; i < config.windows.Length; i++)
+            {
+                var table = config.windows[i];
+                var children = config.parentChildrenTable[table.parent] = new List<string>();
+                for (int j = 0; j < table.orderTables.Length; j++)
+                {
+                    children.Add(table.orderTables[j].window);
+                }
+
+                config.childWindows.AddRange(children);
+            }
         }
 
         return config;
     }
-
 
     public bool FindChildWindow(string _parent, int _order, out string _child)
     {
@@ -63,6 +75,23 @@
         return false;
     }
 
+    public List<string> FindChildWindows(string _parent)
+    {
+        if (parentChildrenTable.ContainsKey(_parent))
+        {
+            return parentChildrenTable[_parent];
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    public bool IsChildWindow(string _name)
+    {
+        return childWindows.Contains(_name);
+    }
+
     [Serializable]
     public struct WindowTable
     {

--
Gitblit v1.8.0