当前位置: 首页>>代码示例>>C#>>正文


C# SkillType类代码示例

本文整理汇总了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;
            }
        }
开发者ID:mMellowz,项目名称:revcore,代码行数:36,代码来源:DataBaseAbility.cs

示例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));
        }
开发者ID:tgoyer,项目名称:LORE,代码行数:7,代码来源:SkillRules.cs

示例3: DangerousSpells

 public DangerousSpells(string spellName, string championName, SpellSlot spellSlot, SkillType type)
 {
     SpellName = spellName;
     ChampionName = championName;
     SpellSlot = spellSlot;
     Type = type;
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:7,代码来源:ModeJump.cs

示例4: SetAbilityModifierType

 private void SetAbilityModifierType(SkillType type)
 {
     var ability = type.GetAttribute<AbilityModifierAttribute>();
     if (ability != null) {
         AbilityModifierType = ability.Type;
     }
 }
开发者ID:RogaDanar,项目名称:Dnd,代码行数:7,代码来源:ReadOnlySkill.cs

示例5: Skill

 public Skill(Position pos, SkillType type, int power)
     : base(pos)
 {
     this.Position = pos;
     this.Type = type;
     this.Power = power;
 }
开发者ID:penjurov,项目名称:TeamGeorgeOrwell,代码行数:7,代码来源:Skill.cs

示例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 "";
    }
开发者ID:himapo,项目名称:Cas2014S,代码行数:34,代码来源:Skill.cs

示例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");
     }
 }
开发者ID:SI-YsInteractive,项目名称:SI-YsInteractive,代码行数:60,代码来源:DeckSelectorManager.cs

示例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;
            }
        }
开发者ID:mMellowz,项目名称:revcore,代码行数:36,代码来源:DataBaseSkill.cs

示例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;
        }
开发者ID:tgoyer,项目名称:LORE,代码行数:8,代码来源:SkillRules.cs

示例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;
 }
开发者ID:Arganato,项目名称:Unity_Tic-Tac-Tower,代码行数:8,代码来源:Order.cs

示例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);
	}
开发者ID:siwenRen,项目名称:Wolf,代码行数:8,代码来源:SealBreakAnim.cs

示例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;
 }
开发者ID:lordzeon,项目名称:YAS4CG,代码行数:9,代码来源:Skill.cs

示例13: Skill

        public Skill(long id, string name, string desc, SkillType type)
        {
            Id = id;
            Name = name;
            Description = desc;
            Type = type;

            All.Add(this);
        }
开发者ID:szyuGH,项目名称:playground,代码行数:9,代码来源:Skill.cs

示例14: ReadOnlySkill

 public ReadOnlySkill(SkillType type, string subSkill = null)
 {
     Type = type;
     Ranks = 0;
     MiscModifier = 0;
     SetAbilityModifierType(type);
     SetSynergyFromTypes(type);
     SubSkill = subSkill;
 }
开发者ID:RogaDanar,项目名称:Dnd,代码行数:9,代码来源:ReadOnlySkill.cs

示例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;
 }
开发者ID:EOTD,项目名称:Err-of-the-Divine,代码行数:10,代码来源:Skill.cs


注:本文中的SkillType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。