Ejemplo n.º 1
0
 public PlayerFootStepR( SfxSystem sfxSystem, FXEvent fxEvent )
     : base(sfxSystem, fxEvent)
 {
     ShakeCamera(0,0,15);
     var name = "foot" + rand.Next(0,6);
     AddSoundStage( @"sound\character\" + name,	fxEvent.Origin, 4, false );
 }
Ejemplo n.º 2
0
        public PlayerLanding( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            float fallSpeed = Math.Abs(fxEvent.Velocity.Y);
            ShakeCamera(0, -30 * fallSpeed, rand.GaussDistribution(0, 10*fallSpeed));

            AddSoundStage( @"sound\character\fall0", fxEvent.Origin, 4, false );
        }
Ejemplo n.º 3
0
        public Mist( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward;

            AddParticleStage("railDot", 0, 0f, 0.1f,   100, true, EmitSpark );
            AddParticleStage("smoke"  , 0, 0f, 0.1f,   200, true, EmitPuff );

            AddLightStage( fxEvent.Origin + sparkDir * 0.1f	, GetRailColor(0.03f), 10.0f, 100f, 3f );
        }
Ejemplo n.º 4
0
        public RocketTrail( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            //AddParticleStage("bulletSpark",		0.00f, 0.1f, 0.0f,  150, true, EmitSpark );
            AddParticleStage("explosionFire",	0.00f, 0.2f, 0.0f,   90, true, EmitFire );
            AddParticleStage("smoke",	0.00f, 0.2f, 0.0f,   60, true, EmitSmoke );

            AddLightStage( fxEvent.Origin * 0.1f	, new Color4(100, 75, 50,1), 1, 100f, 3f );

            AddSoundStage( @"sound\weapon\rfly",	fxEvent.Origin, 1, true );
        }
Ejemplo n.º 5
0
        public PlasmaTrail( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            //AddParticleStage("bulletSpark",		0.00f, 0.1f, 0.0f,  150, true, EmitSpark );
            AddParticleStage("plasmaCore",	0.00f, 0.2f, 0.0f,   30, true, EmitFire );
            //AddParticleStage("smoke",	0.00f, 0.2f, 0.0f,   60, true, EmitSmoke );

            AddLightStage( fxEvent.Origin * 0.1f	, new Color4(195, 195, 250,1), 2, 100f, 3f );

            AddSoundStage( @"sound\weapon\rfly",	fxEvent.Origin, 1, true );
        }
Ejemplo n.º 6
0
        public ShotTrail( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward + rand.GaussRadialDistribution(0, 0.1f);
            sparkDir.Normalize();

            AddParticleStage("bulletSpark", 0, 0f, 0.1f, 10, false, EmitSpark );

            AddLightStage( fxEvent.Origin + sparkDir * 0.1f	, new Color4(125,110, 35,1), 0.5f, 100f, 3f );

            //AddSoundStage( @"sound\weapon\bulletHit",	fxEvent.Origin, 1, false );
        }
Ejemplo n.º 7
0
        public RailHit( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward;

            AddParticleStage("railDot", 0, 0f, 0.1f, 100, false, EmitSpark );
            //AddParticleStage("railDot", 0, 0f, 0.1f,  30, false, EmitPuff );

            AddLightStage( fxEvent.Origin + sparkDir * 0.1f	, GetRailColor(0.03f), 1.0f, 100f, 3f );

            AddSoundStage( @"sound\weapon\railshot",	fxEvent.Origin, 1, false );
        }
Ejemplo n.º 8
0
        public PlasmaExplosion( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward;

            AddParticleStage("plasmaCore",		0.00f, 0.0f, 0.1f,  50, false, EmitSpark );
            AddParticleStage("plasmaCore",		0.00f, 0.1f, 1.0f,   5, false, EmitBall );
            //AddParticleStage("plasmaPuff",	0.10f, 0.1f, 1.0f,   15, false, EmitSmoke );
            AddParticleStage("plasmaFire",	0.05f, 0.1f, 1.0f,   15, false, EmitFire );

            AddLightStage( fxEvent.Origin - sparkDir * 0.1f	, new Color4(195, 195, 250,1), 2, 100f, 3f );

            AddSoundStage( @"sound\weapon\plasmaHit",	fxEvent.Origin, 1, false );
        }
Ejemplo n.º 9
0
        public Explosion( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward;

            AddParticleStage("bulletSpark",		0.00f, 0.0f, 0.1f,  150, false, EmitSpark );
            AddParticleStage("explosionSmoke",	0.10f, 0.1f, 1.0f,  15*3, false, EmitSmoke );
            AddParticleStage("explosionSmoke2",	0.10f, 0.1f, 1.0f,  15*3, false, EmitSmoke );
            AddParticleStage("explosionFire",	0.00f, 0.1f, 1.0f,  30*2, false, EmitFire );

            AddLightStage( fxEvent.Origin + sparkDir * 0.1f	, new Color4(200,150,100,1), 3, 100f, 3f );

            AddSoundStage( @"sound\weapon\explosion",	fxEvent.Origin, 1, false );
        }
Ejemplo n.º 10
0
        public GenericPain( SfxSystem sfxSystem, FXEvent fxEvent, string sound, float shake, int bloodAmount, int gibAmount=0 )
            : base(sfxSystem, fxEvent)
        {
            ShakeCamera( rand.GaussDistribution(0,shake), rand.GaussDistribution(0,shake), rand.GaussDistribution(0,shake) );

            AddParticleStage("bloodSpray04", 0, 0f, 0.1f, bloodAmount, false, EmitBlood );
            AddParticleStage("bloodSpray04", 0, 0f, 0.1f, gibAmount,   false, EmitGib );

            if (sfxSystem.world.IsPlayer(fxEvent.ParentID)) {
                AddSoundStage( sound,	false );
            } else {
                AddSoundStage( sound, fxEvent.Origin, 1, false );
            }
        }
Ejemplo n.º 11
0
        public TeleportOut( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward;

            AddParticleStage("teleportSpark", 0, 0f, 0.1f, 150, false, EmitSpark );

            AddLightStage( fxEvent.Origin + sparkDir * 0.1f	, GetRailColor(0.03f), 1.0f, 100f, 3f );

            if (sfxSystem.world.IsPlayer(fxEvent.ParentID)) {
                AddSoundStage( @"sound\misc\teleport",	false );
            } else {
                AddSoundStage( @"sound\misc\teleport", fxEvent.Origin, 1, false );
            }
        }
Ejemplo n.º 12
0
        public MZBlaster( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            ShakeCamera( rand.GaussDistribution(0,5), rand.GaussDistribution(5,5), rand.GaussDistribution(0,5) );

            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward;
            //AddParticleStage("bulletSpark", 0, 0f, 0.1f, 30, EmitSpark );

            AddLightStage( fxEvent.Origin + sparkDir * 0.1f	, new Color4(137,137,228,1), 1, 100f, 3f );

            if (sfxSystem.world.IsPlayer(fxEvent.ParentID)) {
                AddSoundStage( @"sound\weapon\plasma",	false );
            } else {
                AddSoundStage( @"sound\weapon\plasma", fxEvent.Origin, 1, false );
            }
        }
Ejemplo n.º 13
0
        public RailTrail( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            var p = new Particle();

            p.TimeLag		=	0;

            var m = Matrix.RotationQuaternion( fxEvent.Rotation );
            var up = m.Up;
            var rt = m.Right;

            int count = Math.Min((int)(fxEvent.Velocity.Length() * 20), 2000);

            //
            //	Overall color
            //

            //
            //	Beam :
            //
            p.ImageIndex	=	sfxSystem.GetSpriteIndex("railTrace");

            if (true) {
                var pos		=	fxEvent.Origin;
                var pos1	=	fxEvent.Origin + fxEvent.Velocity;

                SetupMotion	( ref p, pos, Vector3.Zero, Vector3.Zero, 0, 0 );
                SetupTiming	( ref p, 0.2f, 0.01f, 0.9f );
                SetupSize	( ref p, 0.1f, 0.0f );
                SetupAngles	( ref p, 160 );

                p.Color0		=	GetRailColor();
                p.Color1		=	GetRailColor();

                p.TailPosition	=	pos1;
                p.Effects	|=	ParticleFX.Beam;

                rw.ParticleSystem.InjectParticle( p );
            }

            //
            //	Spiral :
            //
            p.ImageIndex	=	sfxSystem.GetSpriteIndex("railDot");
            p.Effects		=	ParticleFX.None;

            for (int i=0; i<count; i++) {

                var t		=	i * 0.1f;
                var c		=	(float)Math.Cos(t);
                var s		=	(float)Math.Sin(t);

                #if true
                var pos		=	fxEvent.Origin + rt * c * 0.05f + up * s * 0.05f + fxEvent.Velocity * (i+0)/(float)count;
                var vel		=	rt * c * 0.15f + up * s * 0.15f + rand.GaussRadialDistribution(0,0.03f);
                #else
                var pos		=	fxEvent.Origin + rt * c * 0.01f + up * s * 0.01f + fxEvent.Velocity * (i+0)/(float)count;
                var vel		=	rt * c * 0.15f + up * s * 0.15f + rand.GaussRadialDistribution(0,0.02f);
                #endif

                var time	=	rand.GaussDistribution(1, 0.2f);

                SetupMotion	( ref p, pos, vel, Vector3.Zero, 0, 0 );
                SetupColor	( ref p, 1000, 1000, 1, 1 );
                SetupTiming	( ref p, time, 0.5f, 0.5f );
                SetupSize	( ref p, 0.03f, 0.0f );
                SetupAngles	( ref p, 160 );

                p.TimeLag		=	-0.1f;
                p.Color0		=	GetRailColor();
                p.Color1		=	GetRailColor();

                p.TailPosition	=	Vector3.Zero;

                //SfxInstance.rw.Debug.Trace( p.Position, 0.2f, Color.Yellow );
                rw.ParticleSystem.InjectParticle( p );
            }

            //
            //	Trace
            //
            p.ImageIndex	=	sfxSystem.GetSpriteIndex("railDot");
            p.Effects		=	ParticleFX.None;

            for (int i=0; i<count/3; i++) {

                var pos		=	fxEvent.Origin + fxEvent.Velocity * (i*3)/(float)count;
                var vel		=	rand.GaussRadialDistribution(0,0.1f);
                var time	=	rand.GaussDistribution(1, 0.2f);

                SetupMotion	( ref p, pos, vel, Vector3.Zero, 0, 0 );
                SetupColor	( ref p, 0, 200, 0, 1 );
                SetupTiming	( ref p, time, 0.5f, 0.5f );
                SetupSize	( ref p, 0.05f, 0.0f );
                SetupAngles	( ref p, 160 );

                p.TimeLag		=	-0.1f;
                p.Color0		=	GetRailColor();
                p.Color1		=	GetRailColor();

                p.TailPosition	=	Vector3.Zero;

                //SfxInstance.rw.Debug.Trace( p.Position, 0.2f, Color.Yellow );
                rw.ParticleSystem.InjectParticle( p );
            }
        }
Ejemplo n.º 14
0
        public RailMuzzle( SfxSystem sfxSystem, FXEvent fxEvent )
            : base(sfxSystem, fxEvent)
        {
            ShakeCamera( rand.GaussDistribution(0,20), rand.GaussDistribution(0,20), rand.GaussDistribution(0,20) );

            sparkDir = Matrix.RotationQuaternion(fxEvent.Rotation).Forward;
            //AddParticleStage("bulletSpark", 0, 0f, 0.1f, 30, EmitSpark );

            AddLightStage( fxEvent.Origin, GetRailColor(0.03f), 2.0f, 100f, 3f );

            if (sfxSystem.world.IsPlayer(fxEvent.ParentID)) {
                AddSoundStage( @"sound\weapon\railshot2",	false );
            } else {
                AddSoundStage( @"sound\weapon\railshot2", fxEvent.Origin, 1, false );
            }
        }
Ejemplo n.º 15
0
 public PlayerJump( SfxSystem sfxSystem, FXEvent fxEvent )
     : base(sfxSystem, fxEvent)
 {
     AddSoundStage( @"sound\character\jump",	fxEvent.Origin, 4, false );
 }
Ejemplo n.º 16
0
 public PlayerDeath( SfxSystem sfxSystem, FXEvent fxEvent )
     : base(sfxSystem, fxEvent, @"sound\character\death1", 0, 0, 150)
 {
 }
Ejemplo n.º 17
0
 public PlayerPain75( SfxSystem sfxSystem, FXEvent fxEvent )
     : base(sfxSystem, fxEvent, @"sound\character\pain75", 150, 50)
 {
 }