diff --git a/.vs/EvilSatellites/v16/.suo b/.vs/EvilSatellites/v16/.suo index 9273a82..cefdcea 100644 Binary files a/.vs/EvilSatellites/v16/.suo and b/.vs/EvilSatellites/v16/.suo differ diff --git a/EvilSatellites/Objects/Satellite.cs b/EvilSatellites/Objects/Satellite.cs index 1e2fde3..97b50a8 100644 --- a/EvilSatellites/Objects/Satellite.cs +++ b/EvilSatellites/Objects/Satellite.cs @@ -12,10 +12,13 @@ namespace EvilSatellites.Objects public class Satellite : AbstractGameObject { private ISoundEffect3D Sound; - public Satellite(IScreen screen, Vector3 pos) : base(screen) + private int Health; + private int SatelliteID; + public Satellite(IScreen screen, Vector3 pos, int satelliteID = 1) : base(screen) { Type = ObjectType.Satellite; - Sound = Screen.Manager.Sound.Load3D(@"sfx/satellite/1/loop.wav"); + SatelliteID = satelliteID; + Sound = Screen.Manager.Sound.Load3D(@"sfx/satellite/"+SatelliteID.ToString()+"/loop.wav"); Sound.Loop = true; Position = pos; Dimensions = new Vector3(5, 5, 5); @@ -29,10 +32,13 @@ namespace EvilSatellites.Objects Sound.Play(); Active = true; ShouldDestroy = false; + Health = 100; } public override void Destroy() { Sound.Destroy(); + ShouldDestroy = true; + Active = false; } override public void Update(GameTime gameTime) @@ -42,7 +48,12 @@ namespace EvilSatellites.Objects public override void OnCollision(IGameObject obj) { - // Sound.Stop(); + Health -= 10; + if (Health <= 0) + { + Screen.Manager.Sound.PlayOneshot(@"sfx/satellite/"+SatelliteID.ToString()+"/explode.wav", new System.Numerics.Vector3(Position.X, Position.Y, Position.Z)); + Destroy(); + } } } } diff --git a/EvilSatellites/sfx/satellite/1/explode.wav b/EvilSatellites/sfx/satellite/1/explode.wav new file mode 100644 index 0000000..83768e9 --- /dev/null +++ b/EvilSatellites/sfx/satellite/1/explode.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d67a5591a021c4f05ec01ce8d5f034fb0cf23b68fa8d9dc8130d6117ff3e754e +size 1870856 diff --git a/EvilSatellites/sfx/sattelite/1/loop.wav b/EvilSatellites/sfx/satellite/1/loop.wav similarity index 100% rename from EvilSatellites/sfx/sattelite/1/loop.wav rename to EvilSatellites/sfx/satellite/1/loop.wav diff --git a/EvilSatellites/sfx/weapons/LaserMG/spindown.wav b/EvilSatellites/sfx/weapons/LaserMG/spindown.wav index c639b0b..8a54a9d 100644 --- a/EvilSatellites/sfx/weapons/LaserMG/spindown.wav +++ b/EvilSatellites/sfx/weapons/LaserMG/spindown.wav @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98706fa6dbbb6e0abb61a8db064d2b99c567379dda060111ea244c7a6a791657 +oid sha256:67adab95fa1cfc1ca99f8405790dea19276e8026c199c7140ece6195e181832b size 149636 diff --git a/EvilSatellites/sfx/weapons/LaserMG/spinning.wav b/EvilSatellites/sfx/weapons/LaserMG/spinning.wav index 7e490e1..fb78b4c 100644 --- a/EvilSatellites/sfx/weapons/LaserMG/spinning.wav +++ b/EvilSatellites/sfx/weapons/LaserMG/spinning.wav @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f729f67450f4a269dcb1a174b59abb3164596fbd4dc527ebcb54ccf82edee263 +oid sha256:b0cdbed9b6065ceb09cbf304c03816e666c30d7a5611e4d9d631dc1bc078a4f8 size 21212 diff --git a/EvilSatellites/sfx/weapons/LaserMG/spinup.wav b/EvilSatellites/sfx/weapons/LaserMG/spinup.wav index 3019192..386f89f 100644 --- a/EvilSatellites/sfx/weapons/LaserMG/spinup.wav +++ b/EvilSatellites/sfx/weapons/LaserMG/spinup.wav @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7edc195ba058b3213ea6b544d737e454311901fc16c5bb84741dd39981633f1 +oid sha256:e09e2fe70cbbaf7aa331b7ab084b03f11137e98f40b71f35305e3c911eed05e7 size 159344