public void SetSkill(StatBit statbit) { SpecialSkill s = _getSkill(statbit.effect_type); if (s == null) { Debug.Log("Skillmaster does not have a skill of type " + statbit.effect_type + "\n"); return; } if (!statbit.hasStat()) { Debug.Log("Setting null skill?\n"); return; } // Debug.Log("Setting skill " + statbit.effect_type + "\n"); s.Skill = statbit; //.GetClone();//should this be a clone or no? s.button.SetSkill(); my_panel.UpdatePanel(); // castle skills are always active but are still set up through buttons. To actually have the skill go off, have to simulate the click. //Architect = do it now, skill is always present //Renew = Regenerate_fake_button fake clicks when health goes down if (Get.isCastleSkill(statbit.effect_type) && CheckSkill(statbit.effect_type)) { s.button.selected = false; if (statbit.effect_type == EffectType.Architect) { s.button.OnClick(); } } }
public Snake(string name, double length, bool isPoisonous, SpecialSkill skill) : base(name) { Name = name; Length = length; IsPoisonous = isPoisonous; Skill = skill; }
public Bird(string name, int maxAltitude, bool isReal, int index, SpecialSkill skill) : base(name) { Name = name; MaxAltitude = maxAltitude; IsReal = isReal; Index = index; Skill = skill; }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "projectile") { if (transform.tag == "StartEnemy") { hp = 0; Destroy(other.gameObject); GameManage gameManage = GameObject.Find("GameManager").GetComponent <GameManage>(); gameManage.StartEnemyHit(); } Arrow arrow = other.GetComponent <Arrow>(); if (arrow != null) { hp -= arrow.damage; Animator animator = GetComponent <Animator>(); animator.SetTrigger("Damaged"); ComboCountObject.ArrowHit(); ArrowDeleteCount arrowDeleteCount = arrow.DeleteAreaObject.GetComponent <ArrowDeleteCount>(); arrowDeleteCount.HitArrow(); Destroy(other.gameObject); } else { SpecialSkill specialSkill = other.GetComponent <SpecialSkill>(); if (specialSkill != null) { ComboCountObject.ArrowHit(); hp = 0; } } int comboNum = ComboCountObject.GetCombo(); GameObject ui = UiObject.GetNumber(comboNum); ui.transform.position = this.transform.position; if (hp <= 0) { Destroy(this.transform.parent.gameObject); GameObject effect = Instantiate(enemyDieEffect, this.gameObject.transform.position, this.gameObject.transform.rotation); } else { GameObject effect = Instantiate(enemyHitEffect, this.gameObject.transform.position, this.gameObject.transform.rotation); } } if (other.gameObject.tag == "PlayerArea") { attack = true; this.transform.parent.LookAt(player.transform); transform.parent.Rotate(new Vector3(0, 1, 0), 180); transform.parent.gameObject.GetComponent <MoveEnemy>().SetTarget(player); GameObject lay = Instantiate(layObject, this.transform.parent.transform); } }
private void AddButton_Click(object sender, RoutedEventArgs e) { if (!(List.ItemsSource is IList <SpecialSkill>)) { return; } var newItem = new SpecialSkill(); ((IList <SpecialSkill>)List.ItemsSource).Add(newItem); List.SelectedItem = newItem; }
public void CancelSkill(EffectType type) { SpecialSkill skill = _getSkill(type); Noisemaker.Instance.Click(ClickType.Error); if (skill == null) { Debug.Log("Skillmaster does not have a skill of type " + type + " to deactivate\n"); return; } skill.CancelSkill(); }
public void UseSkill(EffectType type) { SpecialSkill skill = _getSkill(type); if (skill == null) { Debug.Log("Skillmaster does not have a skill of type " + type + " to use\n"); Noisemaker.Instance.Click(ClickType.Error); return; } Noisemaker.Instance.Play("use_special_skill"); skill.UseSkill(); }
public Tyrande() : base("Tyrande") { Spell velocity = new EffectSpell(stats, new Velocity(1f), 10f, "Velocity"); Spell heal = new EffectSpell(stats, new Heal(3f, 4), 15f, "Touch of Elune"); Spell poison = new EffectSpell(stats, new Poison(), 20f, "Poison"); Spell protect = new EffectSpell(stats, new Protect(10f), 40f, "Protect"); magicSkills.Add(protect); magicSkills.Add(poison); magicSkills.Add(heal); magicSkills.Add(velocity); special = new SpecialSkill(stats, 10f, new List <Spell> { new EffectSpell(stats, new Heal(99f, 1), 0f, "") }, "For Elune"); }
public Kvothe() : base("Kvothe") { Spell fireball = new OffensiveSpell(stats, 15f, "Fire ball"); Spell songOfWind = new EffectSpell(stats, new Velocity(3f), 10f, "Song of wind"); Spell waterball = new OffensiveSpell(stats, 25f, "Water ball"); Spell memory = new EffectSpell(stats, new MagicalAttack(30f, 2), 10f, "Memory"); magicSkills.Add(fireball); magicSkills.Add(waterball); magicSkills.Add(songOfWind); magicSkills.Add(memory); special = new SpecialSkill(stats, 10f, new List <Spell> { new EffectSpell(stats, new Velocity(4f), 0f, ""), new EffectSpell(stats, new Heal(3f, 4), 0f, "") }, "Denna song"); }
public Aragorn() : base("Aragorn") { Spell protect = new EffectSpell(stats, new Protect(15f), 30f, "Protect"); Spell focus = new EffectSpell(stats, new PhysicalAttack(25f, 5), 10f, "Focused Rage"); Spell inner = new EffectSpell(stats, new Heal(30f, 1), 10f, "Inner Rage"); Spell mortalCombo = new OffensiveSpell(stats, 30f, "Mortal Combo"); magicSkills.Add(protect); magicSkills.Add(inner); magicSkills.Add(focus); magicSkills.Add(mortalCombo); special = new SpecialSkill(stats, 10f, new List <Spell> { new OffensiveSpell(stats, 65f, "") }, "Mortal"); }
public void DisableSkill(EffectType type) { SpecialSkill skill = _getSkill(type); if (skill == null) { return; } my_panel.UpdatePanel(); SpecialSkillSaver saver = new SpecialSkillSaver(); saver.type = type; setInventory(saver, false); Noisemaker.Instance.Click(ClickType.Cancel); }
public void ActivateSkill(EffectType type) { SpecialSkill skill = _getSkill(type); if (skill == null) { Debug.Log("Skillmaster does not have a skill of type " + type + "\n"); Noisemaker.Instance.Click(ClickType.Error); return; } Debug.Log("activating " + type + " \n"); Noisemaker.Instance.Click(ClickType.Action); skill.ActivateSkill(true); setInventory(type, true); }
public Netero() : base("Netero") { Spell palmOfBuddha = new OffensiveSpell(stats, 20f, "Palm of Buddha"); Spell nen = new EffectSpell(stats, new PhysicalAttack(25f, 5), 10f, "Nen"); Spell rdef = new EffectSpell(stats, new ReduceDefense(25f, 2), 10f, "Reduce Defense"); Spell protect = new EffectSpell(stats, new Protect(15f), 30f, "Protect"); magicSkills.Add(palmOfBuddha); magicSkills.Add(nen); magicSkills.Add(rdef); magicSkills.Add(protect); special = new SpecialSkill(stats, 10f, new List <Spell> { new EffectSpell(stats, new OccultPower(), 0f, "") }, "OccultPower"); }
public void setInventory(SpecialSkillSaver skillsaver, bool set) { // Debug.Log("Setting inventory " + skillsaver.type + " to " + set + "\n"); bool already_added = CheckSkill(skillsaver.type); SpecialSkill sk = _getSkill(skillsaver.type); if (sk == null) { return; } if (set) { sk.SetRemainingTime(skillsaver.remaining_time); } // else sk.SetRemainingTime(0f); if ((already_added && set) || (!already_added && !set)) { return; } if (already_added && !set) { // Debug.Log("Removing skill " + sk.type + "\n"); removeFromIntentory(skillsaver.type); sk.In_inventory = set; return; } if (!already_added && set && !inventoryFull()) { // Debug.Log("Adding skill " + sk.type + "\n"); in_inventory.Add(skillsaver); sk.In_inventory = set; return; } }
public Pigeon(string name, int maxAltitude, bool isReal, int index, SpecialSkill skill) : base(name, maxAltitude, isReal, index, skill) { }
public Hawk(string name, int maxAltitude, bool isReal, int index, SpecialSkill skill, Bird flyingPartner) : base(name, maxAltitude, isReal, index, skill) { FlyingPartner = flyingPartner; }
public Rattlesnake(string name, double length, bool isPoisonous, SpecialSkill skill) : base(name, length, isPoisonous, skill) { }
public Player(string name) : base(name) { magicSkills = new List <Spell> (); special = new SpecialSkill(stats, 0f, new List <Spell>(), ""); battlePanel = gameSystem.battleCanvas.GetComponent <BattlePanel>(); }
public void refresh(string fielpath) { if (fielpath.Length != 0) { //WWW www = new WWW(fielpath); //yield return www; //MemoryStream ms = new MemoryStream(www.bytes); TextAsset txt = Resources.Load(fielpath) as TextAsset; MemoryStream ms = new MemoryStream(txt.bytes); StructArry pbi = Serializer.DeserializeWithLengthPrefix <StructArry>(ms, PrefixStyle.None); Type type = pbi.GetType(); string strname = type.Name; switch (strname) { case "MsgAttackData": MsgAttackData struct1 = pbi as MsgAttackData; DataPool = struct1.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { AttackData dt = DataPool[i] as AttackData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgAwakeningSkill": MsgAwakeningSkill struct2 = pbi as MsgAwakeningSkill; DataPool = struct2.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { AwakeningSkill dt = DataPool[i] as AwakeningSkill; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgAwakeningSkillLevel": MsgAwakeningSkillLevel struct3 = pbi as MsgAwakeningSkillLevel; DataPool = struct3.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { AwakeningSkillLevel dt = DataPool[i] as AwakeningSkillLevel; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgElementFactor": MsgElementFactor struct4 = pbi as MsgElementFactor; DataPool = struct4.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { ElementFactor dt = DataPool[i] as ElementFactor; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgBuffData": MsgBuffData struct5 = pbi as MsgBuffData; DataPool = struct5.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { BuffData dt = DataPool[i] as BuffData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgCombinationData": MsgCombinationData struct6 = pbi as MsgCombinationData; DataPool = struct6.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { CombinationData dt = DataPool[i] as CombinationData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgConstData": MsgConstData struct7 = pbi as MsgConstData; DataPool = struct7.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { ConstData dt = DataPool[i] as ConstData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgCurrency": MsgCurrency struct8 = pbi as MsgCurrency; DataPool = struct8.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { Currency dt = DataPool[i] as Currency; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgDungeon": MsgDungeon struct9 = pbi as MsgDungeon; DataPool = struct9.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { Dungeon dt = DataPool[i] as Dungeon; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgEnemyData": MsgEnemyData struct10 = pbi as MsgEnemyData; DataPool = struct10.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { EnemyData dt = DataPool[i] as EnemyData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgEvaluateBonus": MsgEvaluateBonus struct11 = pbi as MsgEvaluateBonus; DataPool = struct11.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { EvaluateBonus dt = DataPool[i] as EvaluateBonus; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgFieldEffect": MsgFieldEffect struct12 = pbi as MsgFieldEffect; DataPool = struct12.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { FieldEffect dt = DataPool[i] as FieldEffect; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgHeroData": MsgHeroData struct13 = pbi as MsgHeroData; DataPool = struct13.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { HeroData dt = DataPool[i] as HeroData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgHeroLvData": MsgHeroLvData struct14 = pbi as MsgHeroLvData; DataPool = struct14.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { HeroLvData dt = DataPool[i] as HeroLvData; DataStore.Add((int)dt.level, DataPool[i]); } break; case "MsgHeroEvolution": MsgHeroEvolution struct15 = pbi as MsgHeroEvolution; DataPool = struct15.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { HeroEvolution dt = DataPool[i] as HeroEvolution; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgPotentialData": MsgPotentialData struct16 = pbi as MsgPotentialData; DataPool = struct16.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { PotentialData dt = DataPool[i] as PotentialData; DataStore.Add((int)dt.element, DataPool[i]); } break; case "MsgItemData": MsgItemData struct17 = pbi as MsgItemData; DataPool = struct17.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { ItemData dt = DataPool[i] as ItemData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgLeaderSkill": MsgLeaderSkill struct18 = pbi as MsgLeaderSkill; DataPool = struct18.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { LeaderSkill dt = DataPool[i] as LeaderSkill; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgMonsterData": MsgMonsterData struct19 = pbi as MsgMonsterData; DataPool = struct19.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { MonsterData dt = DataPool[i] as MonsterData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgMonsterSkill": MsgMonsterSkill struct20 = pbi as MsgMonsterSkill; DataPool = struct20.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { MonsterSkill dt = DataPool[i] as MonsterSkill; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgNormalSkill": MsgNormalSkill struct21 = pbi as MsgNormalSkill; DataPool = struct21.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { NormalSkill dt = DataPool[i] as NormalSkill; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgNormalSkillLvUp": MsgNormalSkillLvUp struct22 = pbi as MsgNormalSkillLvUp; DataPool = struct22.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { NormalSkillLvUp dt = DataPool[i] as NormalSkillLvUp; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgRoleData": MsgRoleData struct23 = pbi as MsgRoleData; DataPool = struct23.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { RoleData dt = DataPool[i] as RoleData; DataStore.Add((int)dt.level, DataPool[i]); } break; case "MsgRuneData": MsgRuneData struct24 = pbi as MsgRuneData; DataPool = struct24.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { RuneData dt = DataPool[i] as RuneData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgRuneSet": MsgRuneSet struct25 = pbi as MsgRuneSet; DataPool = struct25.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { RuneSet dt = DataPool[i] as RuneSet; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgRuneEnhance": MsgRuneEnhance struct26 = pbi as MsgRuneEnhance; DataPool = struct26.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { RuneEnhance dt = DataPool[i] as RuneEnhance; DataStore.Add((int)dt.level, DataPool[i]); } break; case "MsgRuneSynchro": MsgRuneSynchro struct27 = pbi as MsgRuneSynchro; DataPool = struct27.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { RuneSynchro dt = DataPool[i] as RuneSynchro; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgSpecialSkill": MsgSpecialSkill struct28 = pbi as MsgSpecialSkill; DataPool = struct28.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { SpecialSkill dt = DataPool[i] as SpecialSkill; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgSpecialSkillLvUp": MsgSpecialSkillLvUp struct29 = pbi as MsgSpecialSkillLvUp; DataPool = struct29.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { SpecialSkillLvUp dt = DataPool[i] as SpecialSkillLvUp; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgDecisionFactor": MsgDecisionFactor struct30 = pbi as MsgDecisionFactor; DataPool = struct30.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { DecisionFactor dt = DataPool[i] as DecisionFactor; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgTaskData": MsgTaskData struct31 = pbi as MsgTaskData; DataPool = struct31.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { TaskData dt = DataPool[i] as TaskData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgHeroText": MsgHeroText struct32 = pbi as MsgHeroText; DataPool = struct32.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { HeroText dt = DataPool[i] as HeroText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgDungeonText": MsgDungeonText struct33 = pbi as MsgDungeonText; DataPool = struct33.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { DungeonText dt = DataPool[i] as DungeonText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgMonsterText": MsgMonsterText struct34 = pbi as MsgMonsterText; DataPool = struct34.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { MonsterText dt = DataPool[i] as MonsterText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgFieldText": MsgFieldText struct35 = pbi as MsgFieldText; DataPool = struct35.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { FieldText dt = DataPool[i] as FieldText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgCombinationText": MsgCombinationText struct36 = pbi as MsgCombinationText; DataPool = struct36.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { CombinationText dt = DataPool[i] as CombinationText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgSkillText": MsgSkillText struct37 = pbi as MsgSkillText; DataPool = struct37.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { SkillText dt = DataPool[i] as SkillText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgCurrencyText": MsgCurrencyText struct38 = pbi as MsgCurrencyText; DataPool = struct38.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { CurrencyText dt = DataPool[i] as CurrencyText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgBuffText": MsgBuffText struct39 = pbi as MsgBuffText; DataPool = struct39.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { BuffText dt = DataPool[i] as BuffText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgItemText": MsgItemText struct40 = pbi as MsgItemText; DataPool = struct40.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { ItemText dt = DataPool[i] as ItemText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgRuneText": MsgRuneText struct41 = pbi as MsgRuneText; DataPool = struct41.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { RuneText dt = DataPool[i] as RuneText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgTaskText": MsgTaskText struct42 = pbi as MsgTaskText; DataPool = struct42.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { TaskText dt = DataPool[i] as TaskText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgWorldData": MsgWorldData struct43 = pbi as MsgWorldData; DataPool = struct43.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { WorldData dt = DataPool[i] as WorldData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgAirRaidData": MsgAirRaidData struct44 = pbi as MsgAirRaidData; DataPool = struct44.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { AirRaidData dt = DataPool[i] as AirRaidData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgTalentData": MsgTalentData struct45 = pbi as MsgTalentData; DataPool = struct45.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { TalentData dt = DataPool[i] as TalentData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgSummonData": MsgSummonData struct46 = pbi as MsgSummonData; DataPool = struct46.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { SummonData dt = DataPool[i] as SummonData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgSummonPrize": MsgSummonPrize struct47 = pbi as MsgSummonPrize; DataPool = struct47.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { SummonPrize dt = DataPool[i] as SummonPrize; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgStarWeight": MsgStarWeight struct48 = pbi as MsgStarWeight; DataPool = struct48.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { StarWeight dt = DataPool[i] as StarWeight; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgSpecialEffect": MsgSpecialEffect struct49 = pbi as MsgSpecialEffect; DataPool = struct49.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { SpecialEffect dt = DataPool[i] as SpecialEffect; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgFlyingEffect": MsgFlyingEffect struct50 = pbi as MsgFlyingEffect; DataPool = struct50.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { FlyingEffect dt = DataPool[i] as FlyingEffect; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgDistanceFactor": MsgDistanceFactor struct51 = pbi as MsgDistanceFactor; DataPool = struct51.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { DistanceFactor dt = DataPool[i] as DistanceFactor; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgEvaluateData": MsgEvaluateData struct52 = pbi as MsgEvaluateData; DataPool = struct52.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { EvaluateData dt = DataPool[i] as EvaluateData; DataStore.Add((int)dt.id, DataPool[i]); } break; case "MsgPromptText": MsgPromptText struct53 = pbi as MsgPromptText; DataPool = struct53.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { PromptText dt = DataPool[i] as PromptText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; case "MsgStoryText": MsgStoryText struct54 = pbi as MsgStoryText; DataPool = struct54.struct_data as List <Struct>; for (int i = 0; i < DataPool.Count; i++) { StoryText dt = DataPool[i] as StoryText; Util.TextDic.Add(Util.GetConfigString(dt.name), Util.GetConfigString(dt.textDes)); } break; } } }