added music functionality
This commit is contained in:
parent
06d54653c3
commit
e2f40e86ad
1 changed files with 3 additions and 1 deletions
|
@ -24,10 +24,12 @@ namespace DangerousD.GameCore
|
|||
}
|
||||
}
|
||||
|
||||
public void StartSound(string soundName) // запустить звук у которого нет позиции
|
||||
public void StartSound(string soundName, bool isMusic) // запустить звук у которого нет позиции
|
||||
{
|
||||
var sound = new Sound(Sounds[soundName]);
|
||||
sound.SoundEffect.IsLooped = false;
|
||||
if (isMusic)
|
||||
sound.SoundEffect.IsLooped = true;
|
||||
sound.SoundEffect.Play();
|
||||
PlayingSounds.Add(sound);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue