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


C# Battle.Wild方法代码示例

本文整理汇总了C#中Battle.Wild方法的典型用法代码示例。如果您正苦于以下问题:C# Battle.Wild方法的具体用法?C# Battle.Wild怎么用?C# Battle.Wild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Battle的用法示例。


在下文中一共展示了Battle.Wild方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Encounter

        public override void Encounter()
        {   
            int level = rng.Next(3, 5);
            int species = rng.Next(1, 101);

            Battle battle = new Battle();

            if (species > 65)
            {
                battle.Wild(generator.Create("Rattata", level));
            }
            else if (species > 30)
            {
                battle.Wild(generator.Create("Pidgey", level));
            }
            else if (species > 15)
            {
                battle.Wild(generator.Create("Weedle", level));
            }
            else
            {
                battle.Wild(generator.Create("Caterpie", level));
            }

            return;
        }
开发者ID:tasosgretsistas,项目名称:pokemontextgame,代码行数:26,代码来源:Route2N.cs

示例2: Encounter

        public override void Encounter()
        {   
            int level = rng.Next(3, 6);
            int level2 = rng.Next(4, 7);
            int species = rng.Next(1, 101);

            Battle battle = new Battle();

            if (species > 75)
            {
                battle.Wild(generator.Create("Caterpie", level));
            }
            else if (species > 50)
            {
                battle.Wild(generator.Create("Weedle", level));
            }
            else if (species > 30)
            {
                battle.Wild(generator.Create("Pidgey", level));
            }
            else if (species > 15)
            {
                battle.Wild(generator.Create("Metapod", level2));
            }
            else
            {
                battle.Wild(generator.Create("Kakuna", level2));
            }
        }
开发者ID:tasosgretsistas,项目名称:pokemontextgame,代码行数:29,代码来源:ViridianForestPart1.cs

示例3: Encounter

        public override void Encounter()
        {
            int level = rng.Next(3, 5);
            int species = rng.Next(1, 101);

            Battle battle = new Battle();

            if (species > 70)
            {
                battle.Wild(generator.Create("Rattata", level));
            }
            else
            {
                battle.Wild(generator.Create("Pidgey", level));
            }
        }
开发者ID:tasosgretsistas,项目名称:pokemontextgame,代码行数:16,代码来源:Route1.cs

示例4: Encounter

        public override void Encounter()
        {   
            int level = rng.Next(3, 6);
            int species = rng.Next(1, 101);

            Battle battle = new Battle();

            if (species > 92)
            {
                battle.Wild(generator.Create("Pidgeotto", 7));
            }            
            else if (species > 84)
            {
                battle.Wild(generator.Create("Pikachu", level));
            }
            else if (species > 42)
            {
                battle.Wild(generator.Create("Metapod", level));
            }
            else
            {
                battle.Wild(generator.Create("Kakuna", level));
            }
        }
开发者ID:tasosgretsistas,项目名称:pokemontextgame,代码行数:24,代码来源:ViridianForestPart2.cs


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