當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。