Init() 공개 메소드

public Init ( ) : void
리턴 void
 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));
     }
 }
예제 #2
0
 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();
                             }
                         }
                     }
                 }
             }
         }
     }
 }