public bool Init() { //InitProcedure(null); InitLogic.StartInit(); SceneMain.Instance.StartInnerCoroutine(InitProcedure(null)); return(true); }
public bool Init(ILogic logic, object obj) { m_Loigc = (InitLogic)logic; //SceneMain.Instance.LogStr = ""; SceneObjMgr.Instance.LoadInnerUpdateBackMat(); GlobalLoading.Instance.Show(); return(true); }
System.Collections.IEnumerator IniProcedure(object obj) { LoadHeadTextTure(); yield return(new WaitForEndOfFrame()); m_Mask.Init(); yield return(new WaitForEndOfFrame()); m_GlobalHallUIObject.Add(m_HeadWind.Init()); m_GlobalHallUIObject.Add(m_SettingWind.Init()); m_GlobalHallUIObject.Add(m_FishSHow.Init()); m_GlobalHallUIObject.Add(m_AboutOur.Init()); m_GlobalHallUIObject.Add(m_TipBox_0.Init()); m_Notice.InitObj(); m_VipMgrLogic.Init(); m_scale = m_Mask.BaseTranF.GetComponent <TweenScale>(); if (m_scale.enabled) { m_scale.enabled = false; } yield return(new WaitForEndOfFrame()); for (byte i = 0; i < FriendSysObj.Length; ++i) { m_FriendSysObj[i] = ResManager.Instance.LoadObject(string.Format("FriendSysWidget{0}", i), "ExtraRes/UI/Predab/FriendsSys/", ResType.ExtraRes, false); } for (byte j = 0; j < ShopSysObj.Length; ++j) { m_ShopSysObj[j] = ResManager.Instance.LoadObject(string.Format("ShopSysWndUI{0}", j), "ExtraRes/UI/Predab/ShopSys/", ResType.ExtraRes, false); } yield return(new WaitForEndOfFrame()); m_GlobalUIObject[0] = ResManager.Instance.LoadObject("Account_Mgr_Wnd", "ExtraRes/UI/Predab/AccountMgr/", ResType.ExtraRes, false); m_GlobalUIObject[1] = ResManager.Instance.LoadObject("SystemTips_Dlg", "ExtraRes/UI/Predab/", ResType.ExtraRes, false); m_GlobalUIObject[2] = ResManager.Instance.LoadObject("Name_Card_Dlg", "ExtraRes/UI/Predab/NameCards/", ResType.ExtraRes, false); m_GlobalUIObject[3] = ResManager.Instance.LoadObject("Match_MsgBox", "ExtraRes/UI/Predab/", ResType.ExtraRes, false); m_GlobalUIObject[4] = ResManager.Instance.LoadObject("Show_RewardWnd", "ExtraRes/UI/Predab/", ResType.ExtraRes, false); m_GlobalUIObject[4] = ResManager.Instance.LoadObject("Show_RewardWnd", "ExtraRes/UI/Predab/", ResType.ExtraRes, false); m_GlobalUIObject[5] = ResManager.Instance.LoadObject("game_share", "ExtraRes/UI/Predab/", ResType.ExtraRes, false); m_objGiftBtneff = ResManager.Instance.LoadObject("UIEF_CharmClick", "ExtraRes/Effect/Prefabs/UIEFCharmClick/", ResType.ExtraRes, false); InitLogic.EndInit(); yield break; }
System.Collections.IEnumerator Initaudio(object dd) { for (byte i = 0; i < 9; i++) { Audio effectAudio = new Audio(); effectAudio.AudioName = string.Format("bgm{0}", i); effectAudio.CreateAudioClip(); m_listBGAudio.Add(effectAudio); } yield return(new WaitForEndOfFrame()); for (byte o = 0; o <= 69; ++o) { Audio effectAudio = new Audio(); effectAudio.AudioName = string.Format("0{0}", o); effectAudio.CreateAudioClip(); if (effectAudio.MyAudioClip != null) { m_listOrdianryAudio.Add(effectAudio); } else { break; } } yield return(new WaitForEndOfFrame()); for (byte s = 0; s < 10; ++s) { Audio effectAudio = new Audio(); effectAudio.AudioName = string.Format("S{0}", s); effectAudio.CreateAudioClip(); if (effectAudio.MyAudioClip != null) { m_listSkillAudio.Add(effectAudio); } else { break; } } InitLogic.EndInit(); yield break; }
public bool Init() { Camera cam = Camera.main; if (cam == null) { cam = GameObject.FindObjectOfType(typeof(Camera)) as Camera; } AudioListener mListener = cam.gameObject.GetComponent <AudioListener>(); if (mListener == null) { if (cam != null) { mListener = cam.gameObject.AddComponent <AudioListener>(); } } //#if UNITY_4_3 || UNITY_4_5 || UNITY_4_6 // BGAudio = mListener.audio; //#else LoopAudio = mListener.GetComponent <AudioSource>(); //#endif if (LoopAudio == null) { LoopAudio = mListener.gameObject.AddComponent <AudioSource>(); } LoopAudio_1 = mListener.gameObject.AddComponent <AudioSource>(); LoopAudio_Gift = mListener.gameObject.AddComponent <AudioSource>(); InitLogic.StartInit(); SceneMain.Instance.StartInnerCoroutine(Initaudio(null)); LoadAudioValue(); SetBGMusicVolue(m_BgValue); SetMusicVolue(m_Value); //int bg = Random.Range(4, 7); int bg = 1; GlobalAudioMgr.Instance.PlayerBGMusic(Audio.EffectBGType.EffectBGSound2); //GlobalAudioMgr.Instance.PlayerBGMusic(GlobalAudioMgr.BGMusic.BgMusic0); return(true); }
System.Collections.IEnumerator InitProcedure(object objobj) { m_BoxObj = ResManager.Instance.LoadObject("Box0", "FishRes/Prefab/", ResType.FishRes, false); m_CardObj = ResManager.Instance.LoadObject("FishCard", "FishRes/Prefab/", ResType.FishRes, false); for (byte i = 0; i < 30; ++i) { string fishid = "Fish" + i.ToString(); Object obj = ResManager.Instance.LoadObject(fishid, "FishRes/Prefab/", ResType.FishRes, false); if (obj == null) { m_FishObjList.Add(null); continue; } ++m_ValidCount; m_ValidMaxCount = i; m_FishObjList.Add(obj); } InitLogic.EndInit(); yield break; }
public static bool Init() { Object obj = ResManager.Instance.LoadObject("channel_setting", "GlobalRes/LocalSetting/", ResType.GlobalRes, typeof(TextAsset)); if (obj == null) { InitLogic.SetInitFailed(); return(false); } TextAsset ta = obj as TextAsset; XmlDocument doc = new XmlDocument(); doc.LoadXml(ta.text); //比赛的标题 //==================================== XmlNode node = doc.DocumentElement.SelectSingleNode("match_title"); byte[] data = System.Text.Encoding.ASCII.GetBytes("com.leduo.buyu"); uint defCrc = Crc.Crc32(data, 0, data.Length); foreach (XmlNode n in node.ChildNodes) { string str = n.Attributes["title"].Value; string str2 = n.Attributes["package"].Value; data = System.Text.Encoding.ASCII.GetBytes(str2); uint crc = Crc.Crc32(data, 0, data.Length); if (crc == defCrc) { m_DefaultTitle = str; } m_MatchTitle.Add(crc, str); } //==================================== ResManager.Instance.UnloadObject(obj); return(true); }
private static System.Collections.IEnumerator OnNewInit(object objd) { Object obj = ResManager.Instance.LoadObject("ServerSetting", "GlobalRes/ServerSetting/", ResType.GlobalRes, typeof(TextAsset)); if (obj == null) { InitLogic.SetInitFailed(); yield break; } TextAsset ta = obj as TextAsset; XmlDocument doc = new XmlDocument(); doc.LoadXml(ta.text); XmlNode pConfig = doc.SelectSingleNode("Config"); XmlNode verNode = pConfig.SelectSingleNode("ServerVersion"); XmlNode comboNode = pConfig.SelectSingleNode("Combo"); XmlNode energyNode = pConfig.SelectSingleNode("Energy"); XmlNode cannonNode = pConfig.SelectSingleNode("Cannon"); XmlNode skillNode = pConfig.SelectSingleNode("Skill"); XmlNode rateNode = pConfig.SelectSingleNode("Rate"); XmlNode fishNode = pConfig.SelectSingleNode("Fish"); XmlNode rankNode = pConfig.SelectSingleNode("Rank"); XmlNode dstNode = pConfig.SelectSingleNode("FishDeadTime"); if (verNode == null || comboNode == null || energyNode == null || skillNode == null || rateNode == null || cannonNode == null || fishNode == null || rankNode == null || dstNode == null) { LogMgr.Log("ServerSetting load failed."); InitLogic.SetInitFailed(); yield break; } if (energyNode.ChildNodes.Count != cannonNode.ChildNodes.Count) { LogMgr.Log("energyNode<>cannonNode"); InitLogic.SetInitFailed(); yield break; } int nFishs = 0; int nFishValues = 0; LauncherInfo [] plauncherinfo; yield return(new WaitForEndOfFrame()); Attribute(verNode, "wonderful_base", ref ExtraSetting.WonderFulBase); /////Ver //Attribute(verNode, "maxfish", ref FishSetting.FISH_MAX_NUM); //Attribute(verNode, "maxbullet", ref BulletSetting.BULLET_MAX_NUM); /////Combo Attribute(comboNode, "sustain_time", ref DoubleHit.IntervalTime); Attribute(comboNode, "buff_cycle", ref DoubleHit.MaxTimes); ////Cannon int launcherCount = energyNode.ChildNodes.Count; plauncherinfo = new LauncherInfo[launcherCount]; LauncherSetting.LauncherDataList = new LauncherData[launcherCount]; for (int i = 0; i < launcherCount; ++i)//from energy { LauncherData ld = new LauncherData(); XmlNode node = energyNode.ChildNodes[i]; Attribute(node, "id", ref ld.ID); Attribute(node, "cditme", ref ld.LaserCDTime); Attribute(node, "speed", ref ld.LaserReduction.Speed); Attribute(node, "time1", ref ld.LaserReduction.Duration1); Attribute(node, "time2", ref ld.LaserReduction.Duration2); Attribute(node, "time3", ref ld.LaserReduction.Duration3); LauncherInfo Item = new LauncherInfo(); Attribute(node, "mincatch", ref Item.nmincatch); Attribute(node, "maxcatch", ref Item.nmaxcatch); Attribute(node, "revise", ref Item.nrevise); Attribute(node, "energyratio", ref Item.denergyratio); if (LauncherSetting.LauncherDataList[ld.ID] != null) { LogMgr.Log("Exist the same launcher id."); InitLogic.SetInitFailed(); yield break; } LauncherSetting.LauncherDataList[ld.ID] = ld; plauncherinfo[ld.ID] = Item; } yield return(new WaitForEndOfFrame()); for (int i = 0; i < launcherCount; ++i)//from cannon { XmlNode node = cannonNode.ChildNodes[i]; byte byid = 0; Attribute(node, "id", ref byid); LauncherData ld = LauncherSetting.LauncherDataList[byid]; ld.name = node.Attributes["name"].Value; Attribute(node, "launcherinterval", ref ld.Interval); Attribute(node, "consume", ref ld.Consume); Attribute(node, "bulletspeed", ref ld.Speed); Attribute(node, "itemid", ref ld.nItemid); Attribute(node, "itemcount", ref ld.nItemcount); Attribute(node, "skill", ref ld.nSkillBind); if (byid == (byte)LauncherType.LAUNCHER_4)//4号炮特有 { Attribute(node, "speed", ref BulletSetting.FreezeBulletReduction.Speed); Attribute(node, "time1", ref BulletSetting.FreezeBulletReduction.Duration1); Attribute(node, "time2", ref BulletSetting.FreezeBulletReduction.Duration2); Attribute(node, "time3", ref BulletSetting.FreezeBulletReduction.Duration3); } } yield return(new WaitForEndOfFrame()); /////SkillInfo int skillCount = skillNode.ChildNodes.Count; SkillSetting.SkillDataList = new SkillData[skillCount]; for (int i = 0; i < skillCount; ++i) { SkillData sd = new SkillData(); XmlNode node = skillNode.ChildNodes[i]; Attribute(node, "id", ref sd.ID); sd.name = node.Attributes["name"].Value; Attribute(node, "cditme", ref sd.CDTime); Attribute(node, "goodsid", ref sd.ItemId); Attribute(node, "multiple", ref sd.multiple); Attribute(node, "speed", ref sd.Reduction.Speed); Attribute(node, "time1", ref sd.Reduction.Duration1); Attribute(node, "time2", ref sd.Reduction.Duration2); Attribute(node, "time3", ref sd.Reduction.Duration3); string szInfo = ""; Attribute(node, "goodsconsume", ref szInfo); if (szInfo.Length > 0) { string[] pConsume = szInfo.Split(' '); for (int index = 0; index < pConsume.Length; index += 2) { SkillConsume pskill = new SkillConsume(); pskill.byorder = System.Convert.ToByte(pConsume[index]); pskill.byCount = System.Convert.ToByte(pConsume[index + 1]); sd.NumRequire.Add(pskill); } } if (SkillSetting.SkillDataList[sd.ID] != null) { LogMgr.Log("Exist the same skill id."); InitLogic.SetInitFailed(); yield break; } SkillSetting.SkillDataList[sd.ID] = sd; } yield return(new WaitForEndOfFrame()); //Rate int rateCount = rateNode.ChildNodes.Count; BulletSetting.BulletRate = new ushort[rateCount]; BulletSetting.RateUnlock = new ushort[rateCount]; BulletSetting.RateReward = new ushort[rateCount]; for (int i = 0; i < rateCount; ++i) { XmlNode node = rateNode.ChildNodes[i]; byte byid = 0; Attribute(node, "id", ref byid); Attribute(node, "value", ref BulletSetting.BulletRate[byid]); Attribute(node, "unlock", ref BulletSetting.RateUnlock[byid]); Attribute(node, "unlockreward", ref BulletSetting.RateReward[byid]); } //Fish int fishCount = fishNode.ChildNodes.Count; FishSetting.FishDataList = new FishData[fishCount]; for (int i = 0; i < fishCount; ++i) { XmlNode node = fishNode.ChildNodes[i]; FishData fd = new FishData(); Attribute(node, "id", ref fd.ID); Attribute(node, "value", ref fd.Gold); fd.Name = node.Attributes["name"].Value; fd.Decl = node.Attributes["declare"].Value; if (FishSetting.FishDataList[fd.ID] != null) { LogMgr.Log("Exist the same fish id:" + fd.ID); InitLogic.SetInitFailed(); yield break; } FishSetting.FishDataList[fd.ID] = fd; byte maxcount = 0; Attribute(node, "maxcount", ref maxcount); nFishs += maxcount; nFishValues += maxcount * fd.Gold; } FishSetting.SortByGold(); yield return(new WaitForEndOfFrame()); //Rank int nRank = rankNode.ChildNodes.Count; Experience.Exp = new uint[nRank]; for (int i = 0; i < nRank; i++) { XmlNode node = rankNode.ChildNodes[i]; byte byid = 0; Attribute(node, "id", ref byid); Attribute(node, "experience", ref Experience.Exp[byid]); } /// //FishDeadTime FishDeadTimeData ftd = new FishDeadTimeData(); Attribute(dstNode, "TianZai_DouDong", ref ftd.TianZai_DouDong_Time);//float.Parse(fishDeadNode.ChildNodes[0].FirstChild.Value); Attribute(dstNode, "TianZai_Stay_Min", ref ftd.TianZai_Stay_Time1); Attribute(dstNode, "TianZai_Stay_Max", ref ftd.TianZai_Stay_Time2); Attribute(dstNode, "TianZai_Dead_Min", ref ftd.TianZai_Dead_Time1); Attribute(dstNode, "TianZai_Dead_Max", ref ftd.TianZai_Dead_Time2); Attribute(dstNode, "Bullet_BingDong_Dead_Min", ref ftd.Bullet_BingDong_Dead_Time1); Attribute(dstNode, "Bullet_BingDong_Dead_Max", ref ftd.Bullet_BingDong_Dead_Time2); Attribute(dstNode, "BingDong_Dead_Min", ref ftd.BingDong_Dead_Time1); Attribute(dstNode, "BingDong_Dead_Max", ref ftd.BingDong_Dead_Time2); Attribute(dstNode, "ShanDian_Dead_Min", ref ftd.ShanDian_Dead_Time1); Attribute(dstNode, "ShanDian_Dead_Max", ref ftd.ShanDian_Dead_Time2); Attribute(dstNode, "LongJuanFeng_Dead_Min", ref ftd.LongJuanFeng_Dead_Time1); Attribute(dstNode, "LongJuanFeng_Dead_Max", ref ftd.LongJuanFeng_Dead_Time2); Attribute(dstNode, "JiGuang_Stay_Time", ref ftd.JiGuang_Stay_Time); Attribute(dstNode, "JiGuang_Dead_Min", ref ftd.JiGuang_Dead_Time1); Attribute(dstNode, "JiGuang_Dead_Max", ref ftd.JiGuang_Dead_Time2); Attribute(dstNode, "ShandDian_Speed", ref ftd.ShandDian_Speed); Attribute(dstNode, "JiGuang_Speed", ref ftd.JiGuang_Speed); Attribute(dstNode, "JiGuang_BingDong_Speed", ref ftd.JiGuang_BingDong_Speed); Attribute(dstNode, "TianZai_Speed", ref ftd.TianZai_Speed); Attribute(dstNode, "BingDong_Speed", ref ftd.BingDong_Speed); FishSetting.FishDeadTime = ftd; //cal for (int i = 0; i < launcherCount; i++) { LauncherInfo item = plauncherinfo[i]; item.nincome = (ushort)((item.nmincatch + item.nmaxcatch) / 2.0f / nFishs * nFishValues + item.nrevise); LauncherSetting.LauncherDataList[i].Energy = (ushort)(item.nincome * item.denergyratio);//大招 } yield return(new WaitForEndOfFrame()); int roomCount = 4; ExtraSetting.RoomDataList = new RoomData[roomCount]; for (int i = 0; i < roomCount; ++i) { RoomData rd = new RoomData(); rd.RoomID = (byte)i; rd.RoomRateIdx = (byte)i; ExtraSetting.RoomDataList[i] = rd; } //XmlNode childNode = pConfig.SelectSingleNode("RoomInfo"); //if (childNode == null) //{ // LogMgr.Log("RoomInfo not found."); // InitLogic.SetInitFailed(); // yield break; //} //int roomCount = childNode.ChildNodes.Count; //ExtraSetting.RoomDataList = new RoomData[roomCount]; //for (int i = 0; i < roomCount; ++i) //{ // RoomData rd = new RoomData(); // rd.RoomID = byte.Parse(childNode.ChildNodes[i].Attributes["id"].Value); // rd.RoomRateIdx = byte.Parse(childNode.ChildNodes[i].FirstChild.Value); // if (ExtraSetting.RoomDataList[rd.RoomID] != null) // { // LogMgr.Log("Exist the same room id."); // InitLogic.SetInitFailed(); // yield break; // } // ExtraSetting.RoomDataList[rd.RoomID] = rd; //} ResManager.Instance.UnloadObject(obj); InitLogic.EndInit(); }
public static bool Init() { ConnectServerIdx = Utility.Range(0, ServerList.Count); //Object obj = ResManager.Instance.LoadObject("ServerSetting", "GlobalRes/ServerSetting/", ResType.GlobalRes, typeof(TextAsset)); //if (obj == null) // return false; //TextAsset ta = obj as TextAsset; //XmlDocument doc = new XmlDocument(); //doc.LoadXml(ta.text); //XmlElement ele = doc.DocumentElement; //XmlNode fishNode = ele.SelectSingleNode("FishInfo"); //XmlNode launcherNode = ele.SelectSingleNode("LauncherInfo"); //XmlNode bulletNode = ele.SelectSingleNode("BulletInfo"); //XmlNode skillNode = ele.SelectSingleNode("SkillInfo"); //XmlNode otherNode = ele.SelectSingleNode("Other"); //XmlNode fishDeadNode = ele.SelectSingleNode("FishDeadTime"); //if (fishNode == null || // launcherNode == null || // bulletNode == null || // skillNode == null || // otherNode == null || // fishDeadNode == null) //{ // LogMgr.Log("ServerSetting load failed."); // return false; //} //XmlNode childNode; ////fish //FishSetting.FISH_MAX_NUM = ushort.Parse(fishNode.Attributes["scene_max_num"].Value); //int fishCount = fishNode.ChildNodes.Count; //FishSetting.FishDataList = new FishData[fishCount]; //for (int i = 0; i < fishCount; ++i) //{ // XmlNode node = fishNode.ChildNodes[i]; // FishData fd = new FishData(); // fd.ID = byte.Parse(node.Attributes["id"].Value); // fd.Gold = ushort.Parse(node.Attributes["gold"].Value); // if (FishSetting.FishDataList[fd.ID] != null) // { // LogMgr.Log("Exist the same fish id:" + fd.ID); // return false; // } // FishSetting.FishDataList[fd.ID] = fd; //} ////launcher //int launcherCount = launcherNode.ChildNodes.Count; //LauncherSetting.LauncherDataList = new LauncherData[launcherCount]; //for (int i = 0; i < launcherCount; ++i) //{ // LauncherData ld = new LauncherData(); // XmlNode node = launcherNode.ChildNodes[i]; // ld.ID = byte.Parse(node.Attributes["id"].Value); // ld.Interval = float.Parse(node.Attributes["interval"].Value); // ld.Energy = ushort.Parse(node.Attributes["energy"].Value); // ld.Consume = byte.Parse(node.Attributes["consume"].Value); // ld.Speed = float.Parse(node.Attributes["bullet_speed"].Value); // ld.LaserCDTime = float.Parse(node.FirstChild.Attributes["cdtime"].Value); // ld.LaserReduction.Speed = float.Parse(node.FirstChild.Attributes["speed"].Value); // ld.LaserReduction.Duration1 = float.Parse(node.FirstChild.Attributes["duration1"].Value); // ld.LaserReduction.Duration2 = float.Parse(node.FirstChild.Attributes["duration2"].Value); // ld.LaserReduction.Duration3 = float.Parse(node.FirstChild.Attributes["duration3"].Value); // if (LauncherSetting.LauncherDataList[ld.ID] != null) // { // LogMgr.Log("Exist the same launcher id."); // return false; // } // LauncherSetting.LauncherDataList[ld.ID] = ld; //} ////bullet //BulletSetting.BULLET_MAX_NUM = byte.Parse(bulletNode.Attributes["scene_max_num"].Value); //childNode = bulletNode.SelectSingleNode("FreezeReduction"); //if (childNode == null) //{ // LogMgr.Log("FreezeReduction not found."); // return false; //} //BulletSetting.FreezeBulletReduction.Speed = float.Parse(childNode.Attributes["speed"].Value); //BulletSetting.FreezeBulletReduction.Duration1 = float.Parse(childNode.Attributes["duration1"].Value); //BulletSetting.FreezeBulletReduction.Duration2 = float.Parse(childNode.Attributes["duration2"].Value); //BulletSetting.FreezeBulletReduction.Duration3 = float.Parse(childNode.Attributes["duration3"].Value); //childNode = bulletNode.SelectSingleNode("BulletRate"); //if (childNode == null) //{ // LogMgr.Log("BulletRate not found."); // return false; //} //int rateCount = childNode.ChildNodes.Count; //BulletSetting.BulletRate = new ushort[rateCount]; //for (int i = 0; i < rateCount; ++i) //{ // BulletSetting.BulletRate[i] = ushort.Parse(childNode.ChildNodes[i].FirstChild.Value); //} ////SkillInfo //int skillCount = skillNode.ChildNodes.Count; //SkillSetting.SkillDataList = new SkillData[skillCount]; //for (int i = 0; i < skillCount; ++i) //{ // SkillData sd = new SkillData(); // sd.ID = byte.Parse(skillNode.ChildNodes[i].Attributes["id"].Value); // sd.CDTime = float.Parse(skillNode.ChildNodes[i].Attributes["cdtime"].Value); // sd.Reduction.Speed = float.Parse(skillNode.ChildNodes[i].Attributes["speed"].Value); // sd.Reduction.Duration1 = float.Parse(skillNode.ChildNodes[i].Attributes["duration1"].Value); // sd.Reduction.Duration2 = float.Parse(skillNode.ChildNodes[i].Attributes["duration2"].Value); // sd.Reduction.Duration3 = float.Parse(skillNode.ChildNodes[i].Attributes["duration3"].Value); // if (SkillSetting.SkillDataList[sd.ID] != null) // { // LogMgr.Log("Exist the same skill id."); // return false; // } // SkillSetting.SkillDataList[sd.ID] = sd; //} ////Other //childNode = otherNode.SelectSingleNode("MultipleEffect"); //if (childNode == null) //{ // LogMgr.Log("MultipleEffect not found."); // return false; //} //ExtraSetting.MultipleEffect = byte.Parse(childNode.FirstChild.Value); //childNode = otherNode.SelectSingleNode("DoubleHit"); //if (childNode == null) //{ // LogMgr.Log("DoubleHit not found."); // return false; //} //DoubleHit.IntervalTime = float.Parse(childNode.Attributes["interval_time"].Value); //DoubleHit.MaxTimes = ushort.Parse(childNode.Attributes["max_times"].Value); //childNode = otherNode.SelectSingleNode("RoomInfo"); //if (childNode == null) //{ // LogMgr.Log("RoomInfo not found."); // return false; //} //int roomCount = childNode.ChildNodes.Count; //ExtraSetting.RoomDataList = new RoomData[roomCount]; //for (int i = 0; i < roomCount; ++i) //{ // RoomData rd = new RoomData(); // rd.RoomID = byte.Parse(childNode.ChildNodes[i].Attributes["id"].Value); // rd.RoomRateIdx = byte.Parse(childNode.ChildNodes[i].FirstChild.Value); // if (ExtraSetting.RoomDataList[rd.RoomID] != null) // { // LogMgr.Log("Exist the same room id."); // return false; // } // ExtraSetting.RoomDataList[rd.RoomID] = rd; //} ////FishDeadTime //FishDeadTimeData ftd = new FishDeadTimeData(); //ftd.TianZai_DouDong_Time = float.Parse(fishDeadNode.ChildNodes[0].FirstChild.Value); //ftd.TianZai_Stay_Time1 = float.Parse(fishDeadNode.ChildNodes[1].FirstChild.Value); //ftd.TianZai_Stay_Time2 = float.Parse(fishDeadNode.ChildNodes[2].FirstChild.Value); //ftd.TianZai_Dead_Time1 = float.Parse(fishDeadNode.ChildNodes[3].FirstChild.Value); //ftd.TianZai_Dead_Time2 = float.Parse(fishDeadNode.ChildNodes[4].FirstChild.Value); //ftd.Bullet_BingDong_Dead_Time1 = float.Parse(fishDeadNode.ChildNodes[5].FirstChild.Value); //ftd.Bullet_BingDong_Dead_Time2 = float.Parse(fishDeadNode.ChildNodes[6].FirstChild.Value); //ftd.BingDong_Dead_Time1 = float.Parse(fishDeadNode.ChildNodes[7].FirstChild.Value); //ftd.BingDong_Dead_Time2 = float.Parse(fishDeadNode.ChildNodes[8].FirstChild.Value); //ftd.ShanDian_Dead_Time1 = float.Parse(fishDeadNode.ChildNodes[9].FirstChild.Value); //ftd.ShanDian_Dead_Time2 = float.Parse(fishDeadNode.ChildNodes[10].FirstChild.Value); //ftd.LongJuanFeng_Dead_Time1 = float.Parse(fishDeadNode.ChildNodes[11].FirstChild.Value); //ftd.LongJuanFeng_Dead_Time2 = float.Parse(fishDeadNode.ChildNodes[12].FirstChild.Value); //ftd.JiGuang_Stay_Time = float.Parse(fishDeadNode.ChildNodes[13].FirstChild.Value); //ftd.JiGuang_Dead_Time1 = float.Parse(fishDeadNode.ChildNodes[14].FirstChild.Value); //ftd.JiGuang_Dead_Time2 = float.Parse(fishDeadNode.ChildNodes[15].FirstChild.Value); //ftd.ShandDian_Speed = float.Parse(fishDeadNode.ChildNodes[16].FirstChild.Value); //ftd.JiGuang_Speed = float.Parse(fishDeadNode.ChildNodes[17].FirstChild.Value); //ftd.JiGuang_BingDong_Speed = float.Parse(fishDeadNode.ChildNodes[18].FirstChild.Value); //ftd.TianZai_Speed = float.Parse(fishDeadNode.ChildNodes[19].FirstChild.Value); //ftd.BingDong_Speed = float.Parse(fishDeadNode.ChildNodes[20].FirstChild.Value); //FishSetting.FishDeadTime = ftd; ////end //ResManager.Instance.UnloadObject(obj); InitLogic.StartInit(); SceneMain.Instance.StartInnerCoroutine(OnNewInit(null)); Object obj = ResManager.Instance.LoadObject("FishConfig", "GlobalRes/ServerSetting/", ResType.GlobalRes, typeof(TextAsset)); if (obj == null) { return(false); } Object objErrorStr = ResManager.Instance.LoadObject("ErrorString", "GlobalRes/ServerSetting/", ResType.GlobalRes, typeof(TextAsset)); if (objErrorStr == null) { return(false); } InitLogic.StartInit(); SceneMain.Instance.StartInnerCoroutine(FishConfig.Instance.LoadFishConfig(obj, objErrorStr)); return(true); }