Exemple #1
0
 static public int get_id(IntPtr l)
 {
     try {
         TableConfig.UI self = (TableConfig.UI)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.id);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #2
0
 static public int constructor(IntPtr l)
 {
     try {
         TableConfig.UI o;
         o = new TableConfig.UI();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #3
0
 static public int GetId(IntPtr l)
 {
     try {
         TableConfig.UI self = (TableConfig.UI)checkSelf(l);
         var            ret  = self.GetId();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #4
0
 static public int set_id(IntPtr l)
 {
     try {
         TableConfig.UI self = (TableConfig.UI)checkSelf(l);
         System.Int32   v;
         checkType(l, 2, out v);
         self.id = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #5
0
 static public int WriteToBinary(IntPtr l)
 {
     try {
         TableConfig.UI            self = (TableConfig.UI)checkSelf(l);
         GameFramework.BinaryTable a1;
         checkType(l, 2, out a1);
         self.WriteToBinary(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #6
0
 static public int ReadFromBinary(IntPtr l)
 {
     try {
         TableConfig.UI            self = (TableConfig.UI)checkSelf(l);
         GameFramework.BinaryTable a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         var ret = self.ReadFromBinary(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #7
0
 private void PreloadUiStories()
 {
     if (null != m_SceneInfo)
     {
         TableConfig.Level level = m_SceneInfo;
         int ct = level.SceneUi.Count;
         for (int ix = 0; ix < ct; ++ix)
         {
             int            uiId = level.SceneUi[ix];
             TableConfig.UI ui   = TableConfig.UIProvider.Instance.GetUI(uiId);
             if (null != ui)
             {
                 if (!string.IsNullOrEmpty(ui.dsl) && !string.IsNullOrEmpty(ui.name))
                 {
                     GfxStorySystem.Instance.PreloadNamespacedStory(ui.name, ui.dsl);
                 }
             }
         }
     }
 }
 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();
                             }
                         }
                     }
                 }
             }
         }
     }
 }