本文整理汇总了C#中SkillType类的典型用法代码示例。如果您正苦于以下问题:C# SkillType类的具体用法?C# SkillType怎么用?C# SkillType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SkillType类属于命名空间,在下文中一共展示了SkillType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPlayerAbility
/// <summary>
/// Get Player Abilities list
/// </summary>
/// <param name="playerId"></param>
/// <returns></returns>
public static Abilities GetPlayerAbility(int playerId, SkillType skillType)
{
using (MySqlConnection connection = new MySqlConnection(connectionString))
{
connection.Open();
Abilities abilities = new Abilities();
using (MySqlCommand command = connection.CreateCommand())
{
command.CommandText = "GAME_PLAYER_ABILITY_GET";
command.CommandType = System.Data.CommandType.StoredProcedure;
command.Parameters.AddWithValue("@in_PlayerId", playerId);
command.Parameters.AddWithValue("@in_AbilityType", skillType);
var reader = command.ExecuteReader();
if (reader.HasRows)
{
while (reader.Read())
{
int abilityId = reader.GetInt32(1);
int abilityLevel = reader.GetInt32(2);
abilities.AddAbility(abilityId, abilityLevel);
}
}
}
connection.Close();
return abilities;
}
}
示例2: AddSkill
public static void AddSkill(this CharacterBase character, SkillType type)
{
var skill = character.GetSkill(type);
if (skill != null) throw new Exception("Skill is already set.");
character.Skills.Add(new Skill(type, GetAbilityModifier(type), 0));
}
示例3: DangerousSpells
public DangerousSpells(string spellName, string championName, SpellSlot spellSlot, SkillType type)
{
SpellName = spellName;
ChampionName = championName;
SpellSlot = spellSlot;
Type = type;
}
示例4: SetAbilityModifierType
private void SetAbilityModifierType(SkillType type)
{
var ability = type.GetAttribute<AbilityModifierAttribute>();
if (ability != null) {
AbilityModifierType = ability.Type;
}
}
示例5: Skill
public Skill(Position pos, SkillType type, int power)
: base(pos)
{
this.Position = pos;
this.Type = type;
this.Power = power;
}
示例6: GetSkillName
public static string GetSkillName(SkillType type)
{
switch(type)
{
case SkillType.DamageUp:
return "GS_DamageUp";
case SkillType.ReloadUp:
return "GS_ReloadUp";
case SkillType.AutoHeal:
return "PS_AutoHeal";
case SkillType.JumpUp:
return "PS_JumpUp";
case SkillType.ExitUp:
return "PS_ExitUp";
case SkillType.SpeedUp:
return "PS_SpeedUp";
case SkillType.Absorb:
return "GS_Absorb";
case SkillType.Accuracy:
return "GS_Accuracy";
case SkillType.Pakorepu:
return "PS_Pakorepu";
case SkillType.FastInterval:
return "GS_FastInterval";
case SkillType.Accelerate:
return "GS_Accelerate";
case SkillType.Decelerate:
return "GS_Decelerate";
default:
break;
}
return "";
}
示例7: 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");
}
}
示例8: GetPlayerSkill
/// <summary>
/// Get Player Skills list
/// </summary>
/// <param name="playerId"></param>
/// <returns></returns>
public static Skills GetPlayerSkill(int playerId, SkillType skillType)
{
using (MySqlConnection connection = new MySqlConnection(connectionString))
{
connection.Open();
Skills skills = new Skills();
using (MySqlCommand command = connection.CreateCommand())
{
command.CommandText = "GAME_PLAYER_SKILL_GET";
command.CommandType = System.Data.CommandType.StoredProcedure;
command.Parameters.AddWithValue("@in_PlayerId", playerId);
command.Parameters.AddWithValue("@in_SkillType", skillType);
var reader = command.ExecuteReader();
if (reader.HasRows)
{
while (reader.Read())
{
int skillId = reader.GetInt32(1);
int skillLevel = reader.GetInt32(2);
skills.AddSkill(skillId, skillLevel);
}
}
}
connection.Close();
return skills;
}
}
示例9: GetSkillScore
public static int GetSkillScore(this CharacterBase character, SkillType skillType)
{
var skill = character.GetSkill(skillType);
if (skill == null) return 0;
var abilityRule = character.GetAbilityScore(skill.SkillModifier);
return skill.Value + abilityRule.Modifier;
}
示例10: Create
public static Order Create(FieldIndex ind, SkillType skill, bool endTurn)
{
Order ret = new Order();
ret.endTurn = endTurn;
ret.skill = skill;
ret.position = ind;
return ret;
}
示例11: PlaySealBreak
public void PlaySealBreak (SkillType type)
{
gameObject.SetActive (true);
SkillData sealData = SkillControl.Me.skillMap [type];
name.text = sealData.skillName;
simp.animatorHelper.Play ("SealBreak", 1, true);
}
示例12: Skill
public Skill(string name, SkillType type, string parentAtt, string desc)
{
Name = name;
Value = 0;
Type = type;
ParentAttribute = parentAtt;
Specializations = new Dictionary<string, Skill>();
Desc = desc;
}
示例13: Skill
public Skill(long id, string name, string desc, SkillType type)
{
Id = id;
Name = name;
Description = desc;
Type = type;
All.Add(this);
}
示例14: ReadOnlySkill
public ReadOnlySkill(SkillType type, string subSkill = null)
{
Type = type;
Ranks = 0;
MiscModifier = 0;
SetAbilityModifierType(type);
SetSynergyFromTypes(type);
SubSkill = subSkill;
}
示例15: Skill
public Skill(uint id, string name, uint ability, uint type, uint cost, uint aoe, uint range, float cooldown) {
skillID = id;
skillName = name;
skillAbility = (AbilityType)ability;
skillType = (SkillType)type;
skillCost = cost;
skillAoe = aoe;
skillRange = range;
skillCooldown = cooldown;
}