Shooting satellites works

This commit is contained in:
2021-04-11 18:42:22 +02:00
parent 2f7759d190
commit c989202d93
10 changed files with 116 additions and 13 deletions
+4 -1
View File
@@ -14,6 +14,7 @@ namespace EvilSatellites.Objects
private ISoundEffect3D Sound;
public Satellite(IScreen screen, Vector3 pos) : base(screen)
{
Type = ObjectType.Satellite;
Sound = Screen.Manager.Sound.Load3D(@"sfx/satellite/1/loop.wav");
Sound.Loop = true;
Position = pos;
@@ -26,6 +27,8 @@ namespace EvilSatellites.Objects
public override void Activate()
{
Sound.Play();
Active = true;
ShouldDestroy = false;
}
public override void Destroy()
{
@@ -39,7 +42,7 @@ namespace EvilSatellites.Objects
public override void OnCollision(IGameObject obj)
{
Sound.Stop();
// Sound.Stop();
}
}
}