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


C# BaseCreature.PlaySound方法代码示例

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


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

示例1: AnimateFlying

		public static void AnimateFlying( BaseCreature fbc )
		{
			if ( NullCheck( fbc ))
				return;

               		fbc.PlaySound( 0x2D0 );
			fbc.Animate( 24, 5, 1, true, false, 0 );
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:8,代码来源:FlyingAI.cs

示例2: OfferResurrection

        public virtual void OfferResurrection(BaseCreature p, Mobile master)
        {
            Direction = GetDirectionTo(p);

            master = p.ControlMaster;

            p.PlaySound(0x214);
            p.FixedEffect(0x376A, 10, 16);

            master.CloseGump(typeof (FactionPetResurrectGump));
            master.SendGump(new FactionPetResurrectGump(master, p, m_Price));
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:12,代码来源:FactionVeterinarian.cs

示例3: Target

        public void Target(BaseCreature bc)
        {
            if (!this.Caster.CanSee(bc.Location) || !this.Caster.InLOS(bc))
            {
                this.Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (!IsValidTarget(bc))
            {
                this.Caster.SendLocalizedMessage(1074379); // You cannot charm that!
            }
            else if (this.Caster.Followers + 3 > this.Caster.FollowersMax)
            {
                this.Caster.SendLocalizedMessage(1049607); // You have too many followers to control that creature.
            }
            else if (bc.Allured)
            {
                this.Caster.SendLocalizedMessage(1074380); // This humanoid is already controlled by someone else.
            }
            else if (this.CheckSequence())
            {
                int level = GetFocusLevel(this.Caster);
                double skill = this.Caster.Skills[this.CastSkill].Value;

                double chance = (skill / 150.0) + (level / 50.0);

                if (chance > Utility.RandomDouble())
                {
                    bc.ControlSlots = 3;
                    bc.Combatant = null;

                    if (this.Caster.Combatant == bc)
                    {
                        this.Caster.Combatant = null;
                        this.Caster.Warmode = false;
                    }

                    if (bc.SetControlMaster(this.Caster))
                    {
                        bc.PlaySound(0x5C4);
                        bc.Allured = true;

                        Container pack = bc.Backpack;

                        if (pack != null)
                        {
                            for (int i = pack.Items.Count - 1; i >= 0; --i)
                            {
                                if (i >= pack.Items.Count)
                                    continue;

                                pack.Items[i].Delete();
                            }
                        }

                        this.Caster.SendLocalizedMessage(1074377); // You allure the humanoid to follow and protect you.
                    }
                }
                else
                {
                    bc.PlaySound(0x5C5);
                    bc.ControlTarget = this.Caster;
                    bc.ControlOrder = OrderType.Attack;
                    bc.Combatant = this.Caster;

                    this.Caster.SendLocalizedMessage(1074378); // The humanoid becomes enraged by your charming attempt and attacks you.
                }
            }

            this.FinishSequence();
        }
开发者ID:bittiez,项目名称:ServUO,代码行数:70,代码来源:DryadAllure.cs


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