Added sound effects and music.
This commit is contained in:
@@ -3,6 +3,7 @@ using AlienAttack.MonoGame.Things.Enemies;
|
||||
using AlienAttack.MonoGame.Things.Items;
|
||||
using AlienAttack.MonoGame.Things.Weapons;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using System;
|
||||
@@ -331,6 +332,13 @@ internal class Player : MoveableSprite
|
||||
|
||||
if (context.Sprite is Shields)
|
||||
{
|
||||
//SCIEnrg_Shield Activate_01_SFRMS_SCIWPNS
|
||||
|
||||
int number = context.Random.Next(1, 6);
|
||||
|
||||
SoundEffect soundEffect = context.Content.Load<SoundEffect>(@$"Sfx\Shield\SCIEnrg_Shield Activate_0{number}_SFRMS_SCIWPNS");
|
||||
soundEffect.Play(0.85f, (float)(context.Random.NextDouble() * 0.1 - 0.05), 0);
|
||||
|
||||
GiveShield(20);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user