public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } m_data = new List <TD_Skill>(); TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_Skill item; for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_Skill(); item.id = node.GetIntValue("skill_id"); item.res = node.GetStringValue("res"); item.des = node.GetStringValue("skill_dis"); item.name = node.GetStringValue("name"); item.point = node.GetIntValue("skill_exp"); item.animation = node.GetStringValue("animation"); item.hero_out = node.GetStringValue("hero_out"); item.hero_back = node.GetStringValue("hero_back"); item.a_trigger = node.GetStringValue("a_trigger"); item.a_value = node.GetStringValue("a_value"); item.effect_target = node.GetStringValue("effect_target"); m_data.Add(item); } asset = null; if (null != m_callBack) { m_callBack(); m_callBack = null; } base.onloaded(data); }
public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } m_data = new Dictionary <int, TD_Skill>(); TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_Skill item; for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_Skill(); item.ID = node.GetIntValue("ID"); item.name = node.GetStringValue("name"); item.type = (Skill_Type)node.GetIntValue("type"); item.icon = node.GetStringValue("icon"); item.des = node.GetStringValue("des"); m_data[item.ID] = item; } asset = null; if (null != m_callBack) { m_callBack(); m_callBack = null; } base.onloaded(data); }
public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } m_data = new List <TD_Card>(); TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_Card item; for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_Card(); item.id = node.GetIntValue("card_id"); item.res = node.GetStringValue("res"); item.name = node.GetStringValue("name"); item.type = (E_CardType)node.GetIntValue("card_type"); item.type1 = node.GetStringValue("card_type1"); item.skill_list = node.GetStringValue("skill_list"); m_data.Add(item); } asset = null; if (null != m_callBack) { m_callBack(); m_callBack = null; } base.onloaded(data); }
public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } m_teamData = new Dictionary <int, TD_Clone>(); TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_Clone item; for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_Clone(); item.id = node.GetIntValue("ID"); item.name = node.GetStringValue("name"); item.openLv = node.GetIntValue("openLv"); item.targetDes = node.GetStringValue("targetDes"); m_teamData[item.id] = item; } asset = null; if (null != m_callBack) { m_callBack(); m_callBack = null; } base.onloaded(data); }
public override void onloaded(AssetBundles.NormalRes data) { if (null != m_confidata) { return; } m_confidata = new Dictionary <int, TD_PlayerPosition>(); byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_PlayerPosition item; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_PlayerPosition(); item.pos = node.GetIntValue("pos"); item.atkPer = node.GetFloatValue("atkPer"); item.defPer = node.GetFloatValue("defPer"); item.controlPer = node.GetFloatValue("controlPer"); item.passPer = node.GetFloatValue("passPer"); item.atkEnable = node.GetIntValue("atkEnable") == 1 ? true : false; item.adaptDef = node.GetStringValue("adaptDef"); m_confidata[item.pos] = item; } asset = null; base.onloaded(data); }
static void LoadCupRewardInfo(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } CupRewardInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new CupRewardInfo(); info.id = node.GetIntValue("id"); info.cup1 = node.GetStringValue("cup1"); info.star1 = node.GetIntValue("star1"); info.cup2 = node.GetStringValue("cup2"); info.star2 = node.GetIntValue("star2"); info.cup3 = node.GetStringValue("cup3"); info.star3 = node.GetIntValue("star3"); info.cup4 = node.GetStringValue("cup4"); info.star4 = node.GetIntValue("star4"); if (CupconfigDic.ContainsKey(info.id)) { CupconfigDic[info.id] = info; } else { CupconfigDic.Add(info.id, info); } } asset = null; }
static void LoadOfficialConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } OfficalInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new OfficalInfo(); info.id = node.GetIntValue("ID"); info.type = node.GetIntValue("officialType"); info.name = node.GetStringValue("name"); info.limit = node.GetIntValue("limit"); info.needLevel = node.GetIntValue("needLevel"); info.needCost = node.GetStringValue("needCost"); info.admit = node.GetIntValue("admit"); info.maxAchievements = node.GetIntValue("maxAchievements"); info.question = node.GetStringValue("question"); info.everyDayReward = node.GetIntValue("everyDayReward"); info.havePermission = node.GetStringValue("havePermission"); info.guildLevel = node.GetIntValue("guildLevel"); info.signUpLimit = node.GetIntValue("signUpLimit"); if (configList.ContainsKey(info.id)) { configList[info.id] = info; } else { configList.Add(info.id, info); } } asset = null; }
static void LoadClothesLevelInfo(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } ClothesLevelInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new ClothesLevelInfo(); info.levelId = node.GetIntValue("id"); info.addValue = node.GetIntValue("addvalue"); info.lockValue = node.GetIntValue("lockvalue"); info.needExp = node.GetIntValue("needexp"); info.needMoney = node.GetIntValue("needmoney"); if (configList.ContainsKey(info.levelId)) { configList[info.levelId] = info; } else { configList.Add(info.levelId, info); } } asset = null; }
static void LoadCupRewardInfo(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_CloneLevel info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new TD_CloneLevel(); info.id = node.GetIntValue("ID"); info.name = node.GetStringValue("name"); info.levels = node.GetStringValue("levels"); info.cup1 = node.GetStringValue("cup1"); info.star1 = node.GetIntValue("star1"); info.cup2 = node.GetStringValue("cup2"); info.star2 = node.GetIntValue("star2"); info.cup3 = node.GetStringValue("cup3"); info.star3 = node.GetIntValue("star3"); info.cup4 = node.GetStringValue("cup4"); info.star4 = node.GetIntValue("star4"); CupconfigDic[info.id] = info; } asset = null; }
static void LoadLevelRewardInfo(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } LevelRewardInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new LevelRewardInfo(); info.id = node.GetIntValue("id"); info.exp = node.GetIntValue("exp"); info.Euro = node.GetIntValue("Euro"); info.preview1 = node.GetStringValue("preview1"); if (levelconfigDic.ContainsKey(info.id)) { levelconfigDic[info.id] = info; } else { levelconfigDic.Add(info.id, info); } } asset = null; }
public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } RewardInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new RewardInfo(); info.itemID = node.GetStringValue("ID"); info.itemType = node.GetIntValue("Type"); info.amount = node.GetIntValue("Contract"); if (configList.ContainsKey(info.itemID)) { configList[info.itemID] = info; } else { configList.Add(info.itemID, info); } } asset = null; base.onloaded(data); }
/// <summary> /// 加载材料配置 /// </summary> public static void LoadMaterialConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } MaterialItemInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new MaterialItemInfo(); info.itemID = node.GetStringValue("ID"); info.needAmount = node.GetIntValue("combineCount"); info.materialId = node.GetIntValue("materialID"); if (materialList.ContainsKey(info.itemID)) { materialList[info.itemID] = info; } else { materialList.Add(info.itemID, info); } } asset = null; }
static void LoadClothesConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } BabyStar info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new BabyStar(); info.id = node.GetIntValue("id"); info.extent = node.GetStringValue("extent"); info.state = node.GetIntValue("state"); info.addvalue = node.GetStringValue("addvalue"); if (configList.ContainsKey(info.id)) { configList[info.id] = info; } else { configList.Add(info.id, info); } } asset = null; }
static void LoadUseEquipConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } EquipUseInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new EquipUseInfo(); info.star = node.GetIntValue("id"); info.exp = node.GetIntValue("exp"); info.money = node.GetIntValue("money"); if (configList.ContainsKey(info.star)) { configList[info.star] = info; } else { configList.Add(info.star, info); } } asset = null; }
bool LoadSkillProperty() { byte[] asset = ResourceManager.Instance.GetXml("SkillProperty"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("SkillProperty/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { SkillProperty sp = new SkillProperty(); TbXmlNode node = xmlNodeList[i] as TbXmlNode; sp.mSkillId = node.GetIntValue("No"); sp.mSkillName = node.GetStringValue("Name"); sp.mSkillOwnerId = node.GetIntValue("Model"); sp.mSkillIndex = node.GetIntValue("SkillNumber"); sp.mSkillSpace = node.GetFloatValue("SkillSpace"); sp.mSkillConsumptionType = (SkillConsumptionType)node.GetIntValue("SkillConsumptionType"); sp.mSkillConsumptionValue = node.GetIntValue("SkillConsumptionValue"); sp.mAnimatorSkillProperty = new AnimatorSkillProperty(); mSkillPropertyDic.Add(sp.mSkillId, sp); } return(true); }
public static void LoadCommonConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } CommonInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new CommonInfo(); info.id = node.GetIntValue("ID"); info.value = node.GetIntValue("value"); if (List.ContainsKey(info.id)) { List[info.id] = info; } else { List.Add(info.id, info); } } asset = null; }
static void LoadConfigInfo(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } BossDailyInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new BossDailyInfo(); info.day = node.GetIntValue("ID"); info.bossID = node.GetIntValue("boosID"); info.openTime = node.GetStringValue("openTime"); if (bossDailyList.ContainsKey(info.day)) { bossDailyList[info.day] = info; } else { bossDailyList.Add(info.day, info); } } asset = null; }
public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; int id = node.GetIntValue("ID"); string surname = node.GetStringValue("TheSurname"); string name = node.GetStringValue("TheName"); if (surname != string.Empty) { if (surnameList.ContainsKey(id)) { surnameList[id] = surname; } else { surnameList.Add(id, surname); } } if (nameList.ContainsKey(id)) { nameList[id] = name; } else { nameList.Add(id, name); } } asset = null; base.onloaded(data); }
public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } m_data = new Dictionary <int, TD_SkillAI>(); TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_SkillAI item; for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_SkillAI(); item.ID = node.GetIntValue("ID"); item.showFlag = (Skill_ShowFlag)node.GetIntValue("showFlag"); item.rangType = (Skill_RangeType)node.GetIntValue("rangType"); item.name = node.GetStringValue("name"); item.shootSkillID = node.GetIntValue("shootSkillID"); item.trail = node.GetStringValue("trail"); item.passTrail = node.GetStringValue("passTrail"); item.eff = node.GetStringValue("eff"); item.effIcon = node.GetStringValue("effIcon"); item.useStep = node.GetStringValue("useStep"); item.actionType = (Skill_ActionType)node.GetIntValue("actionType"); item.keepRound = node.GetIntValue("keepRound"); item.effFun = node.GetStringValue("effFun"); m_data[item.ID] = item; } asset = null; if (null != m_callBack) { m_callBack(); m_callBack = null; } base.onloaded(data); }
static void LoadSkillInfo(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } SkillLevelInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new SkillLevelInfo(); info.id = node.GetIntValue("ID"); info.limit = node.GetIntValue("limit"); if (skillInfoList.ContainsKey(info.id)) { skillInfoList[info.id] = info; } else { skillInfoList.Add(info.id, info); } } asset = null; }
static void LoadClothesConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } ClothesInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new ClothesInfo(); info.configID = node.GetIntValue("id"); info.addValue = node.GetStringValue("addvalue"); info.lockAdd = node.GetStringValue("lockadd"); info.initstar = node.GetIntValue("initstar"); info.type = node.GetIntValue("type"); info.lockLevel = node.GetIntValue("locklevel"); info.maxLevel = node.GetIntValue("maxlevel"); info.maxstar = node.GetIntValue("maxstar"); info.worthValue = node.GetIntValue("worthvalue"); info.percentType = node.GetIntValue("percenttype"); if (configList.ContainsKey(info.configID)) { configList[info.configID] = info; } else { configList.Add(info.configID, info); } } asset = null; }
/// <summary> /// 加载商城配置 /// </summary> public static void LoadShopItemConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } ShopItemInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new ShopItemInfo(); info.itemID = node.GetStringValue("shopItemID"); info.itemType = node.GetIntValue("ItemType"); info.tabType = node.GetIntValue("TabType"); info.limitTime = node.GetIntValue("limitTimes"); info.itemPrice = node.GetIntValue("price"); info.moneyType = node.GetIntValue("moneyType"); info.disCount = node.GetIntValue("disCount"); info.recommend = node.GetIntValue("recommend"); info.isLimit = node.GetIntValue("isLimit"); if (shopList.ContainsKey(info.itemID)) { shopList[info.itemID] = info; } else { shopList.Add(info.itemID, info); } } asset = null; }
bool LoadCloneSceneProperty() { byte[] asset = ResourceManager.Instance.GetXml("CloneScene"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("CloneScene/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; CloneSceneProperty cs = new CloneSceneProperty(); int id = node.GetIntValue("CloneSceneId"); cs.mCloneSceneMonsterInfoList = new List <CloneSceneProperty.CloneSceneMonsterInfo>(); List <TbXmlNode> childNode = node.GetNodes("CloneSceneMonsterInfo"); for (int j = 0; j < childNode.Count; ++j) { TbXmlNode child = childNode[j] as TbXmlNode; CloneSceneProperty.CloneSceneMonsterInfo csm = new CloneSceneProperty.CloneSceneMonsterInfo(); csm.mMonsterId = child.GetIntValue("MonsterId"); csm.mMonsterPosition = UtilTools.FormatStringVector3(child.GetStringValue("MonsterPosition")); csm.mMonsterRotationY = child.GetFloatValue("MonsterRotationY"); csm.mMonsterScale = child.GetFloatValue("MonsterScale"); cs.mCloneSceneMonsterInfoList.Add(csm); } mCloneScenePropertyDic.Add(id, cs); } return(true); }
bool LoadEffectProperty() { byte[] asset = ResourceManager.Instance.GetXml("effectconfig"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("effectconfig/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; EffectProperty ep = new EffectProperty(); int effectId = UtilTools.IntParse(node.GetStringValue("No")); ep.mEffectId = effectId; ep.mEffectModel = UtilTools.IntParse(node.GetStringValue("Model")); ep.mEffectAction = node.GetStringValue("active"); ep.mEffectFile = node.GetStringValue("FileName"); ep.mEffectPath = node.GetStringValue("Path"); ep.mEffectRemovePath = node.GetStringValue("RemoveEffect"); ep.mEffectFollowAction = node.GetIntValue("FollowAction") == 1 ? true : false; ep.mEffectDirectionType = (EffectDirectionType)UtilTools.IntParse(node.GetStringValue("EffectDirectionType")); ep.mEffectDirectionDistance = UtilTools.FloatParse(node.GetStringValue("EffectDirectionDistance")); ep.mEffectFollowRole = UtilTools.BoolParse(node.GetStringValue("EffectRotation")); ep.mEffectFollowBip = UtilTools.BoolParse(node.GetStringValue("EffectFollowBip")); mEffectPropertyDic.Add(effectId, ep); } return(true); }
public override void onloaded(AssetBundles.NormalRes data) { if (null != m_confidata) { return; } m_confidata = new Dictionary <int, TD_PositionAttribute>(); byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } TD_PositionAttribute item; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_PositionAttribute(); item.pos = node.GetIntValue("pos"); item.powerPer = node.GetFloatValue("powerPer"); item.distance = node.GetFloatValue("distance"); item.isBound = node.GetBooleanValue("bound"); m_confidata[item.pos] = item; } asset = null; base.onloaded(data); }
public override void onloaded(AssetBundles.NormalRes data) { if (null != m_confidata) { return; } byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } m_confidata = new Dictionary <int, TD_MatchArray>(); TD_MatchArray item; TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("root/item"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_MatchArray(); item.id = node.GetIntValue("id"); item.name = node.GetStringValue("name"); item.array = node.GetStringValue("array0").Split(','); m_confidata[item.id] = item; } asset = null; base.onloaded(data); }
static void LoadClothesMapConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } ClothesMapInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new ClothesMapInfo(); info.mapID = node.GetIntValue("id"); info.addValue = node.GetStringValue("addvalue"); info.reward = node.GetStringValue("reward"); info.suitName = node.GetStringValue("suiName"); info.spriteName = node.GetStringValue("spriteName"); if (configList.ContainsKey(info.mapID)) { configList[info.mapID] = info; } else { configList.Add(info.mapID, info); } } asset = null; }
public static void LoadSuitConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } SuitInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new SuitInfo(); info.id = node.GetIntValue("id"); info.nameID = node.GetStringValue("name"); info.equipId = node.GetStringValue("equiq"); info.suitAdd = node.GetStringValue("suitadd"); if (configList.ContainsKey(info.id)) { configList[info.id] = info; } else { configList.Add(info.id, info); } } asset = null; }
/// <summary> /// 加载消耗品配置 /// </summary> public static void LoadConsuleConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } ConsumeItemInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new ConsumeItemInfo(); info.itemID = node.GetStringValue("id"); info.propValue = node.GetIntValue("addValue"); if (consumemList.ContainsKey(info.itemID)) { consumemList[info.itemID] = info; } else { consumemList.Add(info.itemID, info); } } asset = null; }
static void LoadConfigInfo(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } RankRewardInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new RankRewardInfo(); info.id = node.GetIntValue("ID"); info.robRewardID = node.GetStringValue("robRewardID"); info.rewardID = node.GetStringValue("rewardID"); if (bossRewardList.ContainsKey(info.id)) { bossRewardList[info.id] = info; } else { bossRewardList.Add(info.id, info); } } asset = null; }