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


C# BaseCreature.Emote方法代码示例

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


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

示例1: LevelUp


//.........这里部分代码省略.........
                player.RawMana += player.StatScale;
            }

            if( player is Dragon )
            {
                if( player.Level > 19 && player.BodyValue == 61 )
                {
                    Gold newloot = new Gold( Utility.RandomMinMax( 1, 3 ) );
                    Container pack = player.Backpack;

                    if( pack != null )
                        pack.DropItem( newloot );

                    player.BodyValue = 59;
                }

                if( player.Level > 38 && player.BodyValue == 59 )
                {
                    Gold newloot = new Gold( Utility.RandomMinMax( 3, 6 ) );
                    Container pack = player.Backpack;

                    if( pack != null )
                        pack.DropItem( newloot );

                    player.BodyValue = 46;
                }
            }

            if( player is Mercenary && ((Mercenary)player).Lives < 8 )
                ((Mercenary)player).Lives++;

            else if( player is BaseBreedableCreature )
            {
                BaseBreedableCreature bbc = player as BaseBreedableCreature;

                if( player.Level % 5 == 0 && bbc.PetEvolution > 0 )
                {
                    bbc.RaiseRandomFeat();
                    bbc.PetEvolution--;
                }

                bbc.UpdateSpeeds();

                if( ((BaseBreedableCreature)player).Lives < (8 + ((BaseBreedableCreature)player).ExtraLives) )
                    ((BaseBreedableCreature)player).Lives++;

                if (player is Serpent)
                {
                    if (player.Level == 40)
                    {
                        if (player is GrassSnake)
                        {
                            ((GrassSnake)player).SetConstrict(true);
                            player.SetDex(player.RawDex / 3);
                            player.BodyValue = 89;
                            player.Emote("*" + player.Name + " has grown more langurous but also more powerful!*");
                            player.PlaySound(0x05E);
                        }
                        else
                        {
                            player.BodyValue = 89;
                            player.Emote("*" + player.Name + " is growing!*");
                            player.PlaySound(0x05E);
                        }
                    }

                    if(player is Viper)
                        ((Viper)player).incSerpentPoison();
                    else if(player is Copperhead)
                        ((Copperhead)player).incSerpentPoison();
                    else if(player is Cobra)
                        ((Cobra)player).incSerpentPoison();
                    else if(player is BlackMamba)
                        ((BlackMamba)player).incSerpentPoison();
                }

                    if (player is WorkHorse)
                    {
                        List<Item> packItems = new List<Item>();
                        foreach (Item item in (player as WorkHorse).Backpack.Items)
                            packItems.Add(item);

                        StrongBackpack newPack = new StrongBackpack((player as WorkHorse).Backpack.MaxWeight + player.StatScale);
                        newPack.MaxItems += Utility.Random(player.StatScale);
                        foreach (Item item in packItems)
                            newPack.AddItem(item);

                        (player as WorkHorse).Backpack.Delete();
                        (player as WorkHorse).AddItem(newPack);
                    }
            }

            else if( player.Controlled && player.Lives < 8 )
                player.Lives++;

            AwardSkill( player, i );

            if( player.Level < 50 )
                CheckLevel( player );
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:101,代码来源:LevelSystem.cs


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