public static void CloseView(UIViewFadePanel view) { if (null != view) { if (view.gameObject.activeSelf) { view.FadeOut(); } } }
protected override void Awake() { base.Awake(); mUITypeMapper.Clear(); for (int i = 0; i < UIList.Length; ++i) { UIViewFadePanel view = UIList[i]; Type t = view.GetType(); if (mUITypeMapper.ContainsKey(t)) { continue; } mUITypeMapper.Add(t, view); } UIList = null; // mUIAtlasMapper.Clear(); for (int i = 0; i < UIAtlasList.Length; ++i) { UIAtlas atlas = UIAtlasList[i]; string n = atlas.name; if (mUIAtlasMapper.ContainsKey(n)) { continue; } mUIAtlasMapper.Add(n, atlas); } UIAtlasList = null; // //mUIFontMapper.Clear(); //for (int i = 0; i < UIFontList.Length; ++i) //{ // UIFont font = UIFontList[i]; // string n = font.name; // if (mUIFontMapper.ContainsKey(n)) // continue; // mUIFontMapper.Add(n, font); //} //UIFontList = null; }