static public int Init(IntPtr l) { try { GameFramework.Story.UiStoryInitializer self = (GameFramework.Story.UiStoryInitializer)checkSelf(l); self.Init(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
private void LoadUi(int levelId) { TableConfig.Level level = TableConfig.LevelProvider.Instance.GetLevel(levelId); if (null != level) { int ct = level.SceneUi.Count; for (int i = 0; i < ct; ++i) { int uiId = level.SceneUi[i]; TableConfig.UI ui = TableConfig.UIProvider.Instance.GetUI(uiId); if (null != ui) { GameObject asset = UiResourceSystem.Instance.GetUiResource(ui.path) as GameObject; if (null != asset) { GameObject uiObj = GameObject.Instantiate(asset); if (null != uiObj) { uiObj.name = ui.name; if (!string.IsNullOrEmpty(ui.dsl)) { GameFramework.Story.UiStoryInitializer initer = uiObj.GetComponent <GameFramework.Story.UiStoryInitializer>(); if (null == initer) { initer = uiObj.AddComponent <GameFramework.Story.UiStoryInitializer>(); } if (null != initer) { initer.WindowName = ui.name; initer.Init(); } } } } } } } }