Initial options screen

This commit is contained in:
2021-04-23 21:08:37 +02:00
parent 1aa7a57d91
commit db9c3cceea
10 changed files with 128 additions and 10 deletions
+5 -2
View File
@@ -9,6 +9,7 @@ namespace EvilSatellites
{
public class MusicManager
{
public string CurrentFile;
public ISoundEffect Song;
public float _Volume;
public float Volume {
@@ -17,9 +18,9 @@ namespace EvilSatellites
{
if (IsPlaying)
{
Song.Volume = Volume;
Song.Volume = value;
}
_Volume = Volume;
_Volume = value;
}
}
public bool IsPlaying;
@@ -33,6 +34,7 @@ namespace EvilSatellites
public void Play(string path)
{
if (path == CurrentFile) return;
if (IsPlaying)
{
Song.Stop();
@@ -43,6 +45,7 @@ namespace EvilSatellites
Song.Play();
Song.Volume = _Volume;
Song.Loop = true;
CurrentFile = path;
IsPlaying = true;
}