public SlamHitGroundEffect2() { Scaling = 1; MainGraphic = metaModel = new MetaModel { Opacity = 0, HasAlpha = true, ReceivesAmbientLight = Priority.Never, ReceivesDiffuseLight = Priority.Never, ReceivesFog = false, Texture = new TextureFromFile("Models/Effects/SlamHit1.png"), World = Matrix.Translation(0, 0, 0.05f), TextureAddress = SlimDX.Direct3D9.TextureAddress.Clamp, }; Orientation = (float)Game.Random.NextDouble() * 2f * (float)Math.PI; VisibilityLocalBounding = Vector3.Zero; scaler = new Common.Interpolator(); scaler.Value = 1f; scaler.AddKey(new Common.InterpolatorKey <float> { Time = 0.15f, Value = 7f }); fader = new EntityFader(this); fader.FadeoutTime = 2.5f; fader.AutoFadeoutTime = 2.0f; Updateable = true; }
public GameEntity() { EditorSelectable = true; EditorMinRandomScale = 1; EditorMaxRandomScale = 1; EditorFollowGroundType = EditorFollowGroupType.Heightmap; EditorPlacementLocalBounding = new Common.Bounding.Cylinder(Vector3.Zero, 3, 1f); Clickable = false; SeeThroughable = false; EditorLockTranslation = false; fader = new EntityFader(this); }
public GameEntity() { EditorSelectable = true; EditorMinRandomScale = 1; EditorMaxRandomScale = 1; EditorFollowGroundType = EditorFollowGroupType.Heightmap; EditorPlacementLocalBounding = new Common.Bounding.Cylinder(Vector3.Zero, 3, 1f); Clickable = false; SeeThroughable = false; EditorLockTranslation = false; fader = new EntityFader(this); }
protected virtual void OnStartsPiranhas() { piranhas = new Props.Piranha1 { Attacking = true }; piranhas.EditorInit(); piranhaFader = new EntityFader(piranhas); piranhaFader.FadeinTime = 0.5f; piranhaFader.FadeoutTime = 0.5f; Scene.Add(piranhas); drowningAcc = 0; piranhaSwimmingChannel = Program.Instance.SoundManager.GetSFX(Sound.SFX.PiranhaAttack1).Play(new Sound.PlayArgs { Position = Translation, Velocity = MotionUnit.Velocity, Looping = true }); }
protected override void PlayDeathEffect() { if (DamageLastFrame > SplatRequiredDamagePerc * MaxHitPoints) { PlaySplatDeathEffect(); Remove(); } else { Scene.Add(new Effects.BloodSplatter { Translation = Translation + Vector3.UnitZ }); var gs = new Props.GroundSplatterDecal { Translation = Translation }; EntityFader f = new EntityFader(gs); f.FadeoutTime = 1; f.AutoFadeoutTime = 10; Scene.Add(gs); removeDeadZombieTimer = 40; } }
public SlamHitGroundEffect1() { Size = new Vector2(1, 1); GridPosition = new Vector3(-0.5f, -0.5f, 0); MainGraphic = metaModel = new MetaModel { Opacity = 0, HasAlpha = true, ReceivesAmbientLight = Priority.Never, ReceivesDiffuseLight = Priority.Never, ReceivesFog = false, XMesh = new MeshConcretize { MeshDescription = new global::Graphics.Software.Meshes.IndexedPlane { Position = new Vector3(-0.5f, -0.5f, 0), Size = new Vector2(1, 1), UVMin = new Vector2(0, 0), UVMax = new Vector2(1, 1), Facings = Facings.Frontside }, Layout = global::Graphics.Software.Vertex.PositionNormalTexcoord.Instance }, Texture = new TextureFromFile("Models/Effects/SlamShockwave1.png"), World = Matrix.RotationZ((float)Game.Random.NextDouble() * 2f * (float)Math.PI) * Matrix.Translation(0, 0, 0.2f) }; VisibilityLocalBounding = Vector3.Zero; scaler = new Common.Interpolator(); scaler.Value = 1f; scaler.AddKey(new Common.InterpolatorKey <float> { Time = 0.3f, Value = 12f }); fader = new EntityFader(this); fader.FadeoutTime = 0.3f; fader.Fadeout(); Updateable = true; }
protected virtual void OnStartsPiranhas() { piranhas = new Props.Piranha1 { Attacking = true }; piranhas.EditorInit(); piranhaFader = new EntityFader(piranhas); piranhaFader.FadeinTime = 0.5f; piranhaFader.FadeoutTime = 0.5f; Scene.Add(piranhas); drowningAcc = 0; piranhaSwimmingChannel = Program.Instance.SoundManager.GetSFX(Sound.SFX.PiranhaAttack1).Play(new Sound.PlayArgs { Position = Translation, Velocity = MotionUnit.Velocity, Looping = true }); }
protected virtual void OnEndsPiranhas() { if (piranhaFader != null) { piranhaFader.Fadeout(); piranhaFader = null; //piranhaSwimmingChannel.Looping = false; if (piranhaSwimmingChannel != null) { piranhaSwimmingChannel.Stop(); piranhaSwimmingChannel = null; } } }
protected override void PlayDeathEffect() { if (DamageLastFrame > SplatRequiredDamagePerc*MaxHitPoints) { PlaySplatDeathEffect(); Remove(); } else { Scene.Add(new Effects.BloodSplatter { Translation = Translation + Vector3.UnitZ }); var gs = new Props.GroundSplatterDecal { Translation = Translation }; EntityFader f = new EntityFader(gs); f.FadeoutTime = 1; f.AutoFadeoutTime = 10; Scene.Add(gs); removeDeadZombieTimer = 40; } }
public SlamHitGroundEffect2() { Scaling = 1; MainGraphic = metaModel = new MetaModel { Opacity = 0, HasAlpha = true, ReceivesAmbientLight = Priority.Never, ReceivesDiffuseLight = Priority.Never, ReceivesFog = false, Texture = new TextureFromFile("Models/Effects/SlamHit1.png"), World = Matrix.Translation(0, 0, 0.05f), TextureAddress = SlimDX.Direct3D9.TextureAddress.Clamp, }; Orientation = (float)Game.Random.NextDouble() * 2f * (float)Math.PI; VisibilityLocalBounding = Vector3.Zero; scaler = new Common.Interpolator(); scaler.Value = 1f; scaler.AddKey(new Common.InterpolatorKey<float> { Time = 0.15f, Value = 7f }); fader = new EntityFader(this); fader.FadeoutTime = 2.5f; fader.AutoFadeoutTime = 2.0f; Updateable = true; }
public SlamHitGroundEffect1() { Size = new Vector2(1, 1); GridPosition = new Vector3(-0.5f, -0.5f, 0); MainGraphic = metaModel = new MetaModel { Opacity = 0, HasAlpha = true, ReceivesAmbientLight = Priority.Never, ReceivesDiffuseLight = Priority.Never, ReceivesFog = false, XMesh = new MeshConcretize { MeshDescription = new global::Graphics.Software.Meshes.IndexedPlane { Position = new Vector3(-0.5f, -0.5f, 0), Size = new Vector2(1, 1), UVMin = new Vector2(0, 0), UVMax = new Vector2(1, 1), Facings = Facings.Frontside }, Layout = global::Graphics.Software.Vertex.PositionNormalTexcoord.Instance }, Texture = new TextureFromFile("Models/Effects/SlamShockwave1.png"), World = Matrix.RotationZ((float)Game.Random.NextDouble() * 2f * (float)Math.PI) * Matrix.Translation(0, 0, 0.2f) }; VisibilityLocalBounding = Vector3.Zero; scaler = new Common.Interpolator(); scaler.Value = 1f; scaler.AddKey(new Common.InterpolatorKey<float> { Time = 0.3f, Value = 12f }); fader = new EntityFader(this); fader.FadeoutTime = 0.3f; fader.Fadeout(); Updateable = true; }
public FadeingEffect() { fader = new EntityFader(this); }
public DemonLordWrathEffect() { MainGraphic = new MetaModel { AlphaRef = 0, HasAlpha = true, Texture = new TextureFromFile("Models/Effects/WrathWave1.png"), SpecularTexture = null, DontSort = true, World = Matrix.Translation(0, 0, 1f), TextureAddress = SlimDX.Direct3D9.TextureAddress.Clamp, ReceivesSpecular = Priority.Never, ReceivesShadows = Priority.Never, ReceivesAmbientLight = Priority.Never, ReceivesDiffuseLight = Priority.Never }; RotateUV = false; Orientation = (float)Game.Random.NextDouble() * (float)Math.PI * 2.0f; Size = new Vector2(1, 1); GridPosition = Common.Math.ToVector3(-Size / 2f); GridResolution = new System.Drawing.Size(10, 10); SnapPositionToHeightmap = DecalSnapping.None; SnapSizeToHeightmap = false; Updateable = true; fader = new EntityFader(this); fader.AutoFadeoutTime = 0.1f; fader.FadeinTime = 0; fader.FadeoutTime = 0.2f; }
public HighRagePulse() { interpolator = new Common.Interpolator(); interpolator.AddKey(new Common.InterpolatorKey<float>() { TimeType = Common.InterpolatorKeyTimeType.Absolute, Time = 0, Value = 0.25f }); interpolator.AddKey(new Common.InterpolatorKey<float>() { TimeType = Common.InterpolatorKeyTimeType.Absolute, Time = TTL, Value = 3.5f }); fader = new EntityFader(this); fader.FadeinTime = 0; fader.FadeoutTime = TTL; fader.AutoFadeoutTime = 0.08f; Updateable = true; MainGraphic = new MetaModel { XMesh = new MeshConcretize { MeshDescription = new Graphics.Software.Meshes.IndexedPlane() { Facings = Facings.Frontside, Position = new Vector3(-0.5f, -0.5f, 0), Size = new Vector2(1, 1), UVMin = Vector2.Zero, UVMax = new Vector2(1, 1) }, Layout = global::Graphics.Software.Vertex.PositionNormalTexcoord.Instance }, Texture = new TextureFromFile("Models/Effects/RageSparkle1.png"), IsBillboard = true, HasAlpha = true, ReceivesAmbientLight = Priority.Never, ReceivesDiffuseLight = Priority.Never, AlphaRef = 0 }; VisibilityLocalBounding = new Common.Bounding.NonfittableBounding(Vector3.Zero, false, true); }