Initial options screen
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user