public static void Free <T>(this TStack <T> self) { if (self != null) { self.Clear(); self = null; } }
public override void Init(params object[] param) { Skybox = RenderSettings.skybox; mInfoList = new List <TUIInfo>() { new TUIInfo(UIEnumBase.None, "UI_None", null, eUIParam.None, 0, 0), new TUIInfo(UIEnumBase.Root, "UI_Root", typeof(UILoot), eUIParam.Standard, 0, 0), new TUIInfo(UIEnumBase.Loading, "UI_Loading", typeof(UILoading), eUIParam.Standard | eUIParam.Top | eUIParam.Mask | eUIParam.Blur, 900, 0), new TUIInfo(UIEnumBase.Connecting, "UI_Connecting", typeof(UIConnecting), eUIParam.Standard | eUIParam.Top | eUIParam.Mask | eUIParam.Blur, 800, 0), new TUIInfo(UIEnumBase.Bubble, "UI_Bubble", typeof(UIBubble), eUIParam.Standard | eUIParam.Top, 700, 0), new TUIInfo(UIEnumBase.Msg, "UI_Msg", typeof(UIMsg), eUIParam.Main | eUIParam.Mask | eUIParam.Blur, 0, 3), new TUIInfo(UIEnumBase.Controller, "UI_Controller", typeof(UIController), eUIParam.Standard | eUIParam.Top, 1000, 0), new TUIInfo(UIEnumBase.Tutorial, "UI_Tutorial", typeof(UITutorial), eUIParam.Standard | eUIParam.Top, 500, 1) }; if (param != null) { param.ForEach(p => mInfoList.Add((TUIInfo)p)); } mForms = new List <UIForm>(); mStandards = new List <UIForm>(); mMainStacks = new TStack <UIForm>(); mTopStacks = new TStack <UIForm>(); #if _BLUR mBlurStacks = new TStack <UIForm>(); #endif #if _MASK mMaskStacks = new TStack <UIForm>(); #endif mFontMap = new Dictionary <string, AssetBundle>(); mStandardAtlasMap = new Dictionary <string, AssetBundle>(); mAtlasMap = new Dictionary <string, AssetBundle>(); mCameraMap = new Dictionary <string, Camera>(); }