Added sound effects and music.

This commit is contained in:
2025-12-22 21:55:46 -05:00
parent 42608a16e3
commit 874c263910
36 changed files with 566 additions and 76 deletions

View File

@@ -1,4 +1,5 @@
using AlienAttack.MonoGame.Things.Bullets;
using Microsoft.Xna.Framework.Audio;
namespace AlienAttack.MonoGame.Things.Weapons;
@@ -20,6 +21,11 @@ public class Minigun : Weapon
// Queue the bullets for spawning
context.SpawnSprite(bullet1);
context.SpawnSprite(bullet2);
int number = context.Random.Next(1, 7);
SoundEffect soundEffect = context.Content.Load<SoundEffect>(@$"Sfx\GUNAuto_Assault Rifle A Fire_0{number}_SFRMS_SCIWPNS");
soundEffect.Play(0.25f, (float)(context.Random.NextDouble() * 0.1 - 0.05), 0);
}
}