本文整理汇总了C#中SkillType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SkillType.ToString方法的具体用法?C# SkillType.ToString怎么用?C# SkillType.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkillType
的用法示例。
在下文中一共展示了SkillType.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setSkill
public void setSkill(SkillType skill)
{
skills [currentSkill].GetComponent<skillPanelPosition> ().text.text = skill.ToString ();
currentSkill++;
backButton.GetComponent<Button> ().interactable = true;
PlayerPrefs.SetInt ("Player" + playerId + "Skill" + currentSkill,(int)skill);
string description = "";
switch (skill)
{
case SkillType.AttaqueRapide:
description = "inflige 4pts de dégats, charge=2s";
break;
case SkillType.AttaquePuissante:
description = "inflige 18pts de dégats, charge=7s";
break;
case SkillType.BouclierBasique:
description = "protège de 3pts de dégats, dure 5s, charge=1s";
break;
case SkillType.BouclierFort:
description = "protège de 12pts de dégats, dure 8 secondes, charge=4s";
break;
case SkillType.BouleDeFeu:
description = "inflige 6pts de dégats, pénètre les protections, charge=6s";
break;
case SkillType.LanceDeFoudre:
description = "inflige 3pts de dégats et bloque une compétence aléatoire pendant 2s, pénètre les protections, charge=6s";
break;
case SkillType.EclairDeGlace:
description = "inflige 1,5pts de dégats, ralentit l'adversaire de 50% pendant 6s, pénètre les protections, charge=6s";
break;
case SkillType.CoupDeGriffe:
description = "inflige 2pts de dégats, plus 5pts sur 10s, charge=2s";
break;
case SkillType.Esquive:
description = "esquive toutes les attaques physiques pendant 2s, charge=3s";
break;
case SkillType.ContreAttaque:
description = "protège de 1pt de dégat et en renvoie 3 pendant 2s, charge=1s";
break;
case SkillType.CoupDeGrace:
description = "inflige 3pts de dégat, dommages x2 si l'ennemi est ralenti/sonné, charge=2s";
break;
case SkillType.ToileProtectrice:
description = "protège 3pts de dégats, ralentit de 50% pendant 3s l'adversaire si il attaque, durée=6s, charge=3s";
break;
case SkillType.PoisonParalysant:
description = "paralyse l'adversaire pendant 6s, charge=6s";
break;
}
skills [currentSkill-1].GetComponent<skillPanelPosition> ().description.text = description;
skills [currentSkill-1].GetComponent<skillPanelPosition> ().description.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector2(skills [currentSkill-1].GetComponent<RectTransform> ().sizeDelta.x,150f);
skills [currentSkill-1].GetComponent<skillPanelPosition> ().skill = skill;
if(currentSkill == 5)
{
if(Application.loadedLevelName == "DeckSelection1")
Application.LoadLevel ("DeckSelection2");
else
Application.LoadLevel("Main");
}
}
示例2: StartCasting
/// <summary>
/// Starts the display of a skill being casted.
/// </summary>
/// <param name="skillType">Type of the skill.</param>
/// <param name="castTime">The time it will take for the skill to be casted.</param>
public void StartCasting(SkillType skillType, TickCount castTime)
{
_currentCastTime = castTime;
_castStartTime = TickCount.Now;
_skillType = skillType;
Text = GameMessageCollection.CurrentLanguage.GetMessage(GameMessage.CombatCastingBegin, skillType.ToString());
var textSize = Font.MeasureString(Text);
_textOffset = (Size / 2f) - (textSize / 2f);
IsVisible = true;
}
示例3: getSkillName
// Helper method to get skill names
public string getSkillName(SkillType skillType)
{
switch (skillType)
{
default: return skillType.ToString();
}
}