• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SkillType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SkillType的典型用法代码示例。如果您正苦于以下问题:C# SkillType类的具体用法?C# SkillType怎么用?C# SkillType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SkillType类属于命名空间,在下文中一共展示了SkillType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: SetSkillValue

        public static void SetSkillValue(this CharacterBase character, SkillType type, int value)
        {
            foreach (var skill in character.Skills)
            {
                if (skill.Type != type) continue;

                skill.Value = value;
                break;
            }
        }
开发者ID:tgoyer,项目名称:LORE,代码行数:10,代码来源:SkillRules.cs


示例17: CreateSkillEntry

        void CreateSkillEntry(Vector2 position, SkillType skillType)
        {
            var skillInfo = SkillInfoManager.Instance[skillType];

            PictureBox pb = new SkillPictureBox(this, skillInfo, position);
            pb.Clicked += SkillPicture_Clicked;

            var skillLabel = new SkillLabel(this, skillInfo, position + new Vector2(_iconSize.X + 4, 0));
            skillLabel.Clicked += SkillLabel_Clicked;
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:10,代码来源:SkillsForm.cs


示例18: isPerformingSkill

 public bool isPerformingSkill(SkillType skillType)
 {
     foreach (ExecuteSkill executeSkill in _executingSkills)
     {
         if (executeSkill.skill.type == skillType)
         {
             return true;
         }
     }
     return false;
 }
开发者ID:klutch,项目名称:Loderpit,代码行数:11,代码来源:PerformingSkillsComponent.cs


示例19: AddSkill

 private static void AddSkill(CharacterBase character, SkillType type, int value)
 {
     if (character.SkillExists(type))
     {
         var skill = character.GetSkill(type);
         character.SetSkillValue(type, skill.Value + value);
     }
     else
     {
         character.AddSkill(type, value);
     }
 }
开发者ID:tgoyer,项目名称:LORE,代码行数:12,代码来源:ClassRules.cs


示例20: Hero

 private Hero(Position pos, float speed, float hp, float att, float def, float range, float mp, SkillType skillType, int skillPower)
     : base(pos, speed, range)
 {
     this.Health = hp;
     this.MaxHP = hp;
     this.Attack = att;
     this.Defence = def;
     this.mana = mp;
     this.maxMP = mp;
     this.Level = 1;
     this.Skill = new Skill(pos, skillType, skillPower);
 }
开发者ID:penjurov,项目名称:TeamGeorgeOrwell,代码行数:12,代码来源:Hero.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SkillshotType类代码示例发布时间:2022-05-24
下一篇:
C# SkillName类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap