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


C# Mobile.MovingParticles方法代码示例

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


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

示例1: OnWeaponHit

		// note that this method will be called when attached to either a mobile or a weapon
		// when attached to a weapon, only that weapon will do additional damage
		// when attached to a mobile, any weapon the mobile wields will do additional damage
		public override void OnWeaponHit(Mobile attacker, Mobile defender, BaseWeapon weapon, int damageGiven)
		{
			// if it is still refractory then return
			if (DateTime.UtcNow < m_EndTime)
			{
				return;
			}

			int damage = 0;

			if (m_Damage > 0)
			{
				damage = Utility.Random(m_Damage);
			}

			if (defender != null && attacker != null && damage > 0)
			{
				attacker.MovingParticles(defender, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
				attacker.PlaySound(0x15E);

				//SpellHelper.Damage( TimeSpan.Zero, defender, attacker, damage, 0, 100, 0, 0, 0 );
				SpellHelper.Damage(TimeSpan.FromSeconds(1.0), defender, attacker, damage);

				m_EndTime = DateTime.UtcNow + Refractory;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:29,代码来源:XmlFire.cs

示例2: DrawFirework

        public static void DrawFirework(Mobile from)
        {
            int[] intEffectID = { 14138, 14154, 14201 };

            Point3D EffectLocation = new Point3D((from.X + Utility.Random(-4, 8)), (from.Y + Utility.Random(-4, 8)), from.Z + 20);
            //	Effects.SendMovingParticles( from, EffectLocation, 0x36E4, 5, 0, false, false, 3006, 4006, 9501, 1, 0, EffectLayer.RightHand, 0x100 );
            IEntity to = new Entity(Serial.Zero, EffectLocation, from.Map);
            from.MovingParticles(to, 0x36E4, 5, 0, false, false, 3006, 4006, 0);
            Timer t = new InternalTimer(from, EffectLocation, intEffectID);

            m_Table[from] = t;

            t.Start();
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:14,代码来源:FireworksSpell.cs

示例3: DoFireball

		public virtual void DoFireball(Mobile attacker, Mobile defender)
		{
			if (!attacker.CanBeHarmful(defender, false))
			{
				return;
			}

			attacker.DoHarmful(defender);

			double damage = GetAosDamage(attacker, 19, 1, 5);

			attacker.MovingParticles(defender, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
			attacker.PlaySound(0x15E);

			SpellHelper.Damage(TimeSpan.FromSeconds(1.0), defender, attacker, damage, 0, 100, 0, 0, 0);
		}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:16,代码来源:BaseWeapon.cs

示例4: DoMagicArrow

		public virtual void DoMagicArrow(Mobile attacker, Mobile defender)
		{
			if (!attacker.CanBeHarmful(defender, false))
			{
				return;
			}

			attacker.DoHarmful(defender);

			double damage = GetAosDamage(attacker, 10, 1, 4);

			attacker.MovingParticles(defender, 0x36E4, 5, 0, false, true, 3006, 4006, 0);
			attacker.PlaySound(0x1E5);

			SpellHelper.Damage(TimeSpan.FromSeconds(1.0), defender, attacker, damage, 0, 100, 0, 0, 0);
		}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:16,代码来源:BaseWeapon.cs

示例5: OnHit

		public override void OnHit( Mobile caster, Mobile target )
		{
			double damage;

			damage = Utility.Random( 7, 5 );

			if ( CheckResisted( target ) )
			{
				damage *= 0.75;

				target.SendLocalizedMessage( 501783 ); // You feel yourself resisting magical energy.
			}

			damage *= GetDamageScalar( target );

			caster.MovingParticles( target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160 );
			caster.PlaySound( Core.AOS ? 0x15E : 0x44B );

			SpellHelper.Damage( this, target, damage, 0, 100, 0, 0, 0 );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:20,代码来源:Fireball.cs

示例6: OnUsage

        public override void OnUsage(Mobile m)
        {
            if (CrateRace.FirstPlace != null)
            {
                if (CrateRace.PartList.Count > 0)
                {
                    RaceData rd = CrateRace.PartList[0];

                    m.MovingParticles(rd.Part, 0x379F, 7, 0, false, true, 3043, 4043, 0x211);
                    m.PlaySound(0x20A);
                    rd.Part.SendMessage("You have been hit by an enormous energy blast!");
                    CrateRace.HandleDamage(rd, .50);
                }
                m.SendMessage("The first in place has been hit by an enormous energy blast!");
            }

            CrateRace.OpenCrates--;
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:18,代码来源:CrateType.cs

示例7: OnTrigger

		public override void OnTrigger(object activator, Mobile m)
		{
			if(m == null ) return;

			// if it is still refractory then return
			if(DateTime.Now < m_EndTime) return;

			int damage = 0;

			if(m_Damage > 0)
				damage = Utility.Random(m_Damage);

			if(damage > 0)
			{
				m.MovingParticles( m, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160 );
				m.PlaySound( 0x15E );
				SpellHelper.Damage( TimeSpan.Zero, m, m, damage, 0, 100, 0, 0, 0 );
			}

			m_EndTime = DateTime.Now + Refractory;

		}    
开发者ID:FreeReign,项目名称:imaginenation,代码行数:22,代码来源:XmlFire.cs

示例8: OnDamagedBySpell

		public override void OnDamagedBySpell( Mobile caster )
		{
			if ( caster.InRange( this, 8 ) )
			{
				caster.MovingParticles( this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1,    0, (EffectLayer)255, 0x100 );
				caster.MovingParticles( this, 0x0001, 1, 0, false,  true, 32, 0, 9535, 9536, 0, (EffectLayer)255, 0 );
				this.PlaySound( 0x209 );

				caster.Mana -= caster.Mana;
				caster.Hits -= caster.Hits;
				caster.Stam -= caster.Stam;
				this.Mana += caster.Mana;
				this.Hits += caster.Hits;
				this.Stam += caster.Stam;
			}

			base.OnDamagedBySpell( caster );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:18,代码来源:DarkMaster.cs

示例9: DoMeteorSwarm

		public void DoMeteorSwarm( Mobile attacker, Mobile defender )
		{
			if ( !attacker.CanBeHarmful( defender, false ) )
				return;

			IPoint3D p = defender.Location;

			if ( !attacker.CanSee( p ) )
			{
				attacker.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( SpellHelper.CheckTown( p, attacker ) )
			{
				SpellHelper.Turn( attacker, p );

				if ( p is Item )
					p = ((Item)p).GetWorldLocation();

				List<Mobile> targets = new List<Mobile>();

				Map map = attacker.Map;

				bool playerVsPlayer = false;

				if ( map != null )
				{
					IPooledEnumerable eable = map.GetMobilesInRange( new Point3D( p ), 2 );

					foreach ( Mobile m in eable )
					{
						if ( attacker != m && SpellHelper.ValidIndirectTarget( attacker, m ) && attacker.CanBeHarmful( m, false ) )
						{
							if ( Core.AOS && !attacker.InLOS( m ) )
								continue;

							targets.Add( m );

							if ( m.Player )
								playerVsPlayer = true;
						}
					}

					eable.Free();
				}

				double damage;

				damage = Utility.Random( 37, 33 );

				if ( targets.Count > 0 )
				{
					Effects.PlaySound( p, attacker.Map, 0x160 );

					if ( targets.Count > 2 )
						damage = (damage * 2) / targets.Count;

					for ( int i = 0; i < targets.Count; ++i )
					{
						Mobile m = targets[i];

						double toDeal = damage;

						attacker.DoHarmful( m );
						SpellHelper.Damage( TimeSpan.FromSeconds( 1.0 ), m, attacker, toDeal, 0, 100, 0, 0, 0 );

						attacker.MovingParticles( m, 0x36D4, 7, 0, false, true, 9501, 1, 0, 0x100 );
					}
				}
				SpellHelper.Damage( TimeSpan.FromSeconds( 1.0 ), defender, attacker, 1, 0, 100, 0, 0, 0 );
			}
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:71,代码来源:MeteorMace.cs

示例10: OnHit

        public override void OnHit(Mobile caster, Mobile target)
        {
            double damage;

            damage = 3;

            if (CheckResisted(target))
            {
                damage *= 0.75;

                target.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
            }

            damage *= GetDamageScalar(target);

            caster.MovingParticles(target, 0x36E4, 5, 0, false, true, 3006, 4006, 0);
            caster.PlaySound(0x1E5);

            SpellHelper.Damage(TimeSpan.FromSeconds(0.50), target, caster, damage, 0, 100, 0, 0, 0);
        }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:20,代码来源:MagicArrow.cs

示例11: OnHit


//.........这里部分代码省略.........
                            {
                                from.AddStatMod( new StatMod( StatType.Int, name, -10, TimeSpan.FromSeconds( 60.0 ) ) );
                            }
                            MagEffCharges--;
                        from.FixedParticles( 0x3779, 10, 15, 5004, EffectLayer.Head );
                        from.PlaySound( 0x1E4 );
                        }
                        break;
                    case PreUORMagEff.Weakness:
                        if( Utility.RandomDouble() <= 0.35 ) //35% chance for this to hit defender successfully
                        {
                            string name = String.Format( "[Magic] {0} Offset", StatType.Str );

                            StatMod mod = from.GetStatMod( name );

                            if ( mod != null && mod.Offset < 0 )
                            {
                                from.AddStatMod( new StatMod( StatType.Str, name, mod.Offset + -10, TimeSpan.FromSeconds( 60.0 ) ) );
                            }
                            else if ( mod == null || mod.Offset < 10 )
                            {
                                from.AddStatMod( new StatMod( StatType.Str, name, -10, TimeSpan.FromSeconds( 60.0 ) ) );
                            }
                            MagEffCharges--;
                        from.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                        from.PlaySound( 0x1E6 );
                        }
                        break;
                    case PreUORMagEff.Burning:
                        if( Utility.RandomDouble() <= 0.35 ) //35% chance for this to hit defender successfully
                        {
                            DoMagicArrow( attacker, defender );
                            MagEffCharges--;
                            attacker.MovingParticles( defender, 0x36E4, 5, 0, false, true, 3006, 4006, 0 );
                            attacker.PlaySound( 0x1E5 );
                        }
                        break;
                    case PreUORMagEff.Wounding:
                        if( Utility.RandomDouble() <= 0.35 ) //35% chance for this to hit defender successfully
                        {
                            DoHarm( attacker, defender );
                            MagEffCharges--;
                            defender.FixedParticles( 0x374A, 10, 15, 5013, EffectLayer.Waist );
                            defender.PlaySound( 0x1F1 );
                        }
                        break;
                    case PreUORMagEff.DaemonBreath:
                        if( Utility.RandomDouble() <= 0.35 ) //35% chance for this to hit defender successfully
                        {
                            DoFireball( attacker, defender );
                            MagEffCharges--;
                            attacker.MovingParticles( defender, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160 );
                            attacker.PlaySound( 0x15E );
                        }
                        break;
                    case PreUORMagEff.Thunder:
                        if( Utility.RandomDouble() <= 0.35 ) //35% chance for this to hit defender successfully
                        {
                            DoLightning( attacker, defender );
                            MagEffCharges--;
                            defender.BoltEffect( 0 );
                        }
                        break;
                    case PreUORMagEff.MagesBane:
                        if( Utility.RandomDouble() <= 0.25 ) //25% chance for this to hit defender successfully
                        {
开发者ID:guy489,项目名称:runuot2a,代码行数:67,代码来源:BaseWeapon.cs


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