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


C# Skill.LoadSkillFromText方法代码示例

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

示例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;
            }
        }
开发者ID:Amarinal,项目名称:S3,代码行数:81,代码来源:Player.cs

示例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;
            }
        }
开发者ID:Amarinal,项目名称:S3,代码行数:27,代码来源:Game.cs

示例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();
            }
        }
开发者ID:Amarinal,项目名称:S3,代码行数:24,代码来源:Player.cs


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