// Use this for initialization public IEnumerator _Start() { //Debug.Log((new System.Object[] { 113, 123, "asd" }).ArrayAsSml()); //Debug.Log((new System.Object[] { 113, 123, "asd", Round2.GunkFlags.Danger }).ArrayAsSml().SmlToArray()); //return; yield return(null); Oni.InstanceFileManager fm = new Oni.InstanceFileManager(); Oni.InstanceFile level0 = fm.OpenFile((Application.isEditor ? @"D:\OniCleanInstall\" : @"..\..\") + @"GameDataFolder\level0_Final.dat"); Oni.InstanceFile level1 = fm.OpenFile((Application.isEditor ? @"D:\OniCleanInstall\" : @"..\..\") + @"GameDataFolder\level1_Final.dat"); m_descriptors = level1.GetNamedDescriptors(); m_descriptorsLeft = m_descriptors.Count; foreach (Oni.InstanceDescriptor desc in m_descriptors) { if (m_installers.ContainsKey(desc.Template.Tag)) { yield return(null); TryInvoke(() => { m_installers[desc.Template.Tag](desc); }); } m_descriptorsLeft--; } Round2.__ONCC.GetByName("konoko_generic").TMP_InstallNewCharacter(level0); }
void _Start() { Oni.InstanceFileManager fm = new Oni.InstanceFileManager(); l_currentFile = l_0File = fm.OpenFile((Application.isEditor ? @"D:\OniCleanInstall\" : @"..\..\") + @"GameDataFolder\level0_Final.dat"); System.DateTime l_dt = System.DateTime.Now; foreach (Oni.InstanceDescriptor ides in l_0File.Descriptors) { try { if (ides.IsPlaceholder) { Debug.LogError("placeholder in 0 file " + ides.Template.Tag); continue; } else { switch (ides.Template.Tag) { case Oni.TemplateTag.DOOR: Round2.Generated.Binary.DOOR.RegisterDoorClass(ides); break; case Oni.TemplateTag.BINA: ConvertInstance <Round2.Generated.Binary.BINA>(ides); break; case Oni.TemplateTag.TXMP: m_textures.Add(ides.Name, ConvertInstance <Round2.Generated.Binary.TXMP>(ides)); break; } } ZeroRegistryPush(ides); } catch (System.Exception ee) { Debug.LogError("cant add " + ides.Name + " beause of " + ee.ToString()); } } l_currentFile = fm.OpenFile((Application.isEditor ? @"D:\OniCleanInstall\" : @"..\..\") + @"GameDataFolder\level1_Final.dat"); foreach (Oni.InstanceDescriptor ides in l_currentFile.Descriptors) { switch (ides.Template.Tag) { case Oni.TemplateTag.BINA: ConvertInstance <Round2.Generated.Binary.BINA>(ides); break; case Oni.TemplateTag.AKEV: Debug.Log(ides.Index); break; case Oni.TemplateTag.ONLV: Round2.Generated.Binary.ONLV l_lvl = ConvertInstance <Round2.Generated.Binary.ONLV>(ides); Debug.Log(l_lvl.m_AKEV_Link_48.Value.m_File_id_0); l_lvl.Build(); foreach (Round2.Generated.Binary.AISA.Package pkg in l_lvl.m_AISA_Link_64.Value.m_pkg_20) { Debug.LogWarning(pkg.m_ONCC_link_28.m_lnkId); Debug.Log(l_currentFile.GetDescriptor(pkg.m_ONCC_link_28.m_lnkId).Template.Tag); Debug.Log(pkg.m_ONCC_link_28.Value); pkg.m_ONCC_link_28.Value.BuildONCC(pkg.m_ONCC_link_28.Descriptor); } break; } } Door.m_lateInitialize(); Door.m_lateInitialize = () => { }; //BINA_OBJC_DOOR.m_lateImpl(); Debug.Log("initialization is over in " + (System.DateTime.Now - l_dt).Milliseconds + " ms"); }