| | |
| | | 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)
|
| | |
| | | }
|
| | |
|
| | | return config;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public bool FindChildWindow(string _parent, int _order, out string _child)
|
| | | {
|
| | | for (int i = 0; i < windows.Length; i++)
|
| | |
| | |
|
| | | _child = string.Empty;
|
| | | return false;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public bool FindParentWindow(string _child, out string _parent)
|
| | | {
|
| | | for (int i = 0; i < windows.Length; i++)
|
| | |
| | |
|
| | | _parent = string.Empty;
|
| | | return false;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public List<string> FindChildWindows(string _parent)
|
| | | {
|
| | | if (parentChildrenTable.ContainsKey(_parent))
|
| | |
| | | {
|
| | | 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;
|
| | | } |
| | | |
| | | } |
| | | }
|
| | |
|
| | | }
|