Added more sound effeects. Added audio manager.
This commit is contained in:
@@ -88,6 +88,8 @@ internal class GreenEnemy : EnemyShip
|
||||
context.SpawnSprite(new MinigunBulletSmall(originX + 14, YPosition + BoundBox.Height - 12, 0, 2 + YVelocity, this));
|
||||
|
||||
CurrentFireThreshold = FireThreshold;
|
||||
|
||||
context.AudioManager.PlayEnemyFire();
|
||||
}
|
||||
|
||||
//CheckMove(context);
|
||||
@@ -100,10 +102,12 @@ internal class GreenEnemy : EnemyShip
|
||||
{
|
||||
context.SpawnSprite(new Explosion((int)XPosition, (int)YPosition, XVelocity, YVelocity));
|
||||
|
||||
int number = context.Random.Next(1, 7);
|
||||
//int number = context.Random.Next(1, 7);
|
||||
|
||||
SoundEffect soundEffect = context.Content.Load<SoundEffect>(@$"Sfx\Explosions\EXPLDsgn_Explosion Impact_0{number}_SFRMS_SCIWPNS");
|
||||
soundEffect.Play(0.95f, (float)(context.Random.NextDouble() * 0.1 - 0.05), 0);
|
||||
//SoundEffect soundEffect = context.Content.Load<SoundEffect>(@$"Sfx\Explosions\EXPLDsgn_Explosion Impact_0{number}_SFRMS_SCIWPNS");
|
||||
//soundEffect.Play(0.95f, (float)(context.Random.NextDouble() * 0.1 - 0.05), 0);
|
||||
|
||||
context.AudioManager.PlayExplosion();
|
||||
}
|
||||
|
||||
private void CheckFire(SpriteUpdateContext context)
|
||||
|
||||
Reference in New Issue
Block a user