Added more sound effeects. Added audio manager.

This commit is contained in:
2025-12-28 21:23:23 -05:00
parent 874c263910
commit c4a98ce03d
32 changed files with 550 additions and 37 deletions

View File

@@ -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)