Initial debris
This commit is contained in:
@@ -14,6 +14,7 @@ namespace EvilSatellites.Objects
|
||||
private ISoundEffect3D Sound;
|
||||
private int Health;
|
||||
private int SatelliteID;
|
||||
private Random rnd = new Random();
|
||||
public Satellite(IScreen screen, Vector3 pos, int satelliteID = 1) : base(screen)
|
||||
{
|
||||
Type = ObjectType.Satellite;
|
||||
@@ -52,8 +53,15 @@ namespace EvilSatellites.Objects
|
||||
if (Health <= 0)
|
||||
{
|
||||
Screen.Manager.Sound.PlayOneshot(@"sfx/satellite/"+SatelliteID.ToString()+"/explode.wav", new System.Numerics.Vector3(Position.X, Position.Y, Position.Z));
|
||||
SpawnDebris();
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public void SpawnDebris()
|
||||
{
|
||||
var screen = (GameScreen)Screen;
|
||||
screen.AddObject(new Debris(screen, Position));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user