少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-31 0cf1eaf02e1ec4536b181877d7aecc3e22bf84a2
UI/Common/WindowConfig.cs
@@ -1,17 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
[CreateAssetMenu(menuName = "Config/WindowConfig")]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
[CreateAssetMenu(menuName = "Config/WindowConfig")]
public class WindowConfig : ScriptableObject
{
{
    public WindowTable[] windows;
    public Dictionary<string, List<string>> parentChildrenTable = new Dictionary<string, List<string>>();
    public List<string> childWindows = new List<string>();
    static WindowConfig config;
    [NonSerialized] public Dictionary<string, List<string>> parentChildrenTable = new Dictionary<string, List<string>>();
    [NonSerialized] public List<string> childWindows = new List<string>();
    static WindowConfig config;
    public static WindowConfig Get()
    {
        if (config == null)
@@ -31,8 +32,8 @@
        }
        return config;
    }
    }
    public bool FindChildWindow(string _parent, int _order, out string _child)
    {
        for (int i = 0; i < windows.Length; i++)
@@ -53,8 +54,8 @@
        _child = string.Empty;
        return false;
    }
    }
    public bool FindParentWindow(string _child, out string _parent)
    {
        for (int i = 0; i < windows.Length; i++)
@@ -73,8 +74,8 @@
        _parent = string.Empty;
        return false;
    }
    }
    public List<string> FindChildWindows(string _parent)
    {
        if (parentChildrenTable.ContainsKey(_parent))
@@ -85,25 +86,25 @@
        {
            return null;
        }
    }
    }
    public bool IsChildWindow(string _name)
    {
        return childWindows.Contains(_name);
    }
    [Serializable]
    }
    [Serializable]
    public struct WindowTable
    {
        public string parent;
        public OrderTable[] orderTables;
    }
    [Serializable]
    }
    [Serializable]
    public struct OrderTable
    {
        public int order;
        public string window;
    }
}
    }
}