本文整理汇总了C#中Skill.LoadSkillFromText方法的典型用法代码示例。如果您正苦于以下问题:C# Skill.LoadSkillFromText方法的具体用法?C# Skill.LoadSkillFromText怎么用?C# Skill.LoadSkillFromText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skill
的用法示例。
在下文中一共展示了Skill.LoadSkillFromText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddSkillFromText
public void AddSkillFromText(String skillText)
{
Skill skill = new Skill();
skill.LoadSkillFromText(skillText);
this.Skills.Add(skill);
}
示例2: SetHero
public void SetHero(string heroName)
{
Skill skill = null;
this.Skills = new List<Skill>();
this.maxHitPoints = 0;
hero = heroName;
switch (heroName)
{
case "Groc":
this.HitPoints = 53;
skill = new Skill();
skill.LoadSkillFromText("Enhance All invisibility,1");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Barrier,2");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Empower All,1");
Skills.Add(skill);
break;
case "Lich":
this.HitPoints = 48;
skill = new Skill();
skill.LoadSkillFromText("Bolt All,1");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Enhance Poison,1");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Enhance All Siphon,1");
Skills.Add(skill);
break;
case "Ursurio":
this.HitPoints = 42;
skill = new Skill();
skill.LoadSkillFromText("Empower Wyld,2");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Empower Wyld,2");
Skills.Add(skill);
break;
case "Samael":
this.HitPoints = 49;
skill = new Skill();
skill.LoadSkillFromText("Enhance All Armor,1");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Enhance Vengance,2");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Weaken All,1");
Skills.Add(skill);
break;
case "Decim":
this.HitPoints = 49;
skill = new Skill();
skill.LoadSkillFromText("Enhance All Vengance,1");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Bolt,1");
Skills.Add(skill);
skill = new Skill();
skill.LoadSkillFromText("Bolt,1");
Skills.Add(skill);
break;
default:
LoadFromText(heroName);
break;
}
}
示例3: SetOption
protected void SetOption(string option)
{
if (this.combatOptions == null) return;
Skill skill = null;
switch (option)
{
case "t":
case "tower":
combatOptions.DefenderCards.Add(cards.GetCard("Tower", 0));
break;
case "f":
case "frogs":
skill = new Skill();
skill.LoadSkillFromText("Barrier All Frog,2");
combatOptions.BattleEffects.Add(skill);
break;
case "d":
case "dragons":
skill = new Skill();
skill.LoadSkillFromText("Heal% All Dragon,20");
combatOptions.BattleEffects.Add(skill);
break;
default:
break;
}
}
示例4: LoadFromText
public void LoadFromText(string heroString)
{
//Hitpoints;Skill;Skill...
try
{
string[] parts = heroString.Split('-');
Skill skill = null;
this.HitPoints = Convert.ToInt32(parts[0]);
for (int i = 1; i < parts.Length; i++)
{
skill = new Skill();
skill.LoadSkillFromText(parts[i]);
Skills.Add(skill);
}
}
catch (Exception ex)
{
this.maxHitPoints = 0;
this.HitPoints = 50;
Skills.Clear();
}
}