using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
namespace Model
{
///
/// 管理所有UI
///
[EntityEvent(typeof (UIComponent))]
public class UIComponent: Component
{
private UI Root;
private Dictionary UiTypes;
private readonly Dictionary uis = new Dictionary();
public override void Dispose()
{
if (this.Id == 0)
{
return;
}
base.Dispose();
foreach (UIType type in uis.Keys.ToArray())
{
UI ui;
if (!uis.TryGetValue(type, out ui))
{
continue;
}
uis.Remove(type);
ui.Dispose();
}
}
private void Awake()
{
GameObject uiCanvas = GameObject.Find("/UICanvas");
uiCanvas.GetComponent