bool LoadFormula() { byte[] asset = ResourceManager.Instance.GetXml("Formula"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Formula/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; string id = node.GetStringValue("FormulaId"); string text = node.GetStringValue("Formula"); mFormulaDic.Add(id, text); } return(true); }
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_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_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 List <TD_SkillPrefabInfo>(); 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_SkillPrefabInfo item; for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_SkillPrefabInfo(); item.id = node.GetStringValue("id"); item.scale = node.GetStringValue("scale"); item.rootScale = node.GetStringValue("rootScale"); item.enemyPoint = node.GetStringValue("enemyPoint"); item.selfPoint = node.GetStringValue("selfPoint"); item.haveEnemy = node.GetBooleanValue("haveEnemy"); 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 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); }
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; }
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); }
bool LoadSlowMotionProperty() { byte[] asset = ResourceManager.Instance.GetXml("SlowMotionProperty"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("SlowMotion/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; SlowMotionProperty smp = new SlowMotionProperty(); smp.mSlowMotionId = UtilTools.IntParse(node.GetStringValue("ActionId")); smp.mSlowMotionStepList = new List <SlowMotionStep>(); List <TbXmlNode> childNode = node.GetNodes("SlowMotions"); for (int j = 0; j < childNode.Count; ++j) { TbXmlNode child = childNode[j] as TbXmlNode; SlowMotionStep sms = new SlowMotionStep(); sms.mIndex = UtilTools.IntParse(child.GetStringValue("Index")); sms.mTimeScale = UtilTools.FloatParse(child.GetStringValue("TimeScale")); sms.mTime = UtilTools.FloatParse(child.GetStringValue("Time")); sms.mFieldOfView = UtilTools.FloatParse(child.GetStringValue("FieldOfView")); smp.mSlowMotionStepList.Add(sms); } mSlowMotionPropertyDic.Add(smp.mSlowMotionId, smp); } return(true); }
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; }
bool LoadAIProperty() { byte[] asset = ResourceManager.Instance.GetXml("AI"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("AI/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; AIProperty ap = new AIProperty(); ap.mAIId = UtilTools.IntParse(node.GetStringValue("Id")); //mAIPropertyDic.Add(ap.mAIId, text); } return(true); }
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; }
/// <summary> /// 加载道具配置 /// </summary> public static void LoadItemConfig(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; } ItemInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new ItemInfo(); info.itemID = node.GetStringValue("ItemId"); info.itemType = node.GetIntValue("ItemType"); info.color = node.GetIntValue("Color"); info.itemName = node.GetStringValue("ItemName"); info.itemPrice = node.GetIntValue("ItemPrice"); info.tabType = node.GetIntValue("TabType"); info.isTogether = node.GetIntValue("isTogethe"); info.qualityOrder = node.GetIntValue("worthValue"); if (itemList.ContainsKey(info.itemID)) { itemList[info.itemID] = info; } else { itemList.Add(info.itemID, info); } } asset = null; }
public override void onloaded(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } m_data = new List <TD_Eff>(); 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_Eff item; for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; item = new TD_Eff(); item.id = node.GetIntValue("effect_id"); item.reference = node.GetStringValue("reference"); item.condition = node.GetIntValue("condition"); item.time_type = node.GetIntValue("time_type"); item.time_value = node.GetIntValue("time_value"); item.choose = node.GetIntValue("choose"); item.target = node.GetIntValue("target"); item.effect = node.GetIntValue("effect"); item.effect_value = node.GetIntValue("effect_value"); item.effect_value_c_rate = node.GetIntValue("effect_value_c_rate"); item.fight_value = node.GetIntValue("fight_value"); item.valid_type = node.GetIntValue("valid_type"); item.valid_value = node.GetIntValue("valid_value"); m_data.Add(item); } asset = null; if (null != m_callBack) { m_callBack(); m_callBack = null; } base.onloaded(data); }
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) { 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); }
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; }
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; }
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; }
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; }
/// <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); }
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); }
/// <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; }
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); }
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; }
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); }
/// <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; }
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; } TbXmlNode node = xmlNodeList[0] as TbXmlNode; offX = node.GetFloatValue("offX"); offY = node.GetFloatValue("offY"); offZ = node.GetFloatValue("offZ"); pX = node.GetFloatValue("pX"); pY = node.GetFloatValue("pY"); pZ = node.GetFloatValue("pZ"); rX = node.GetFloatValue("rX"); rY = node.GetFloatValue("rY"); rZ = node.GetFloatValue("rZ"); bound = node.GetStringValue("bound"); fieldView = node.GetFloatValue("fieldView"); asset = null; base.onloaded(data); }