Unstatic the Sound class.

This commit is contained in:
Paul Chote
2015-09-05 18:31:21 +01:00
parent ff10fe3e07
commit ef55d646f7
82 changed files with 207 additions and 206 deletions

View File

@@ -134,7 +134,7 @@ namespace OpenRA.Mods.Common.Traits
if (!SongExists(currentSong))
return;
Sound.PlayMusicThen(currentSong, () =>
Game.Sound.PlayMusicThen(currentSong, () =>
{
if (!CurrentSongIsBackground && !Game.Settings.Sound.Repeat)
currentSong = GetNextSong();
@@ -161,7 +161,7 @@ namespace OpenRA.Mods.Common.Traits
currentSong = music;
CurrentSongIsBackground = false;
Sound.PlayMusicThen(music, onComplete);
Game.Sound.PlayMusicThen(music, onComplete);
}
public MusicInfo GetNextSong()
@@ -195,7 +195,7 @@ namespace OpenRA.Mods.Common.Traits
public void Stop()
{
currentSong = null;
Sound.StopMusic();
Game.Sound.StopMusic();
if (currentBackgroundSong != null)
{
@@ -208,7 +208,7 @@ namespace OpenRA.Mods.Common.Traits
public void Disposing(Actor self)
{
if (currentSong != null)
Sound.StopMusic();
Game.Sound.StopMusic();
}
}
}

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits
public void WorldLoaded(World world, WorldRenderer wr)
{
Sound.PlayNotification(world.Map.Rules, null, "Speech", info.Notification, world.RenderPlayer == null ? null : world.RenderPlayer.Faction.InternalName);
Game.Sound.PlayNotification(world.Map.Rules, null, "Speech", info.Notification, world.RenderPlayer == null ? null : world.RenderPlayer.Faction.InternalName);
}
}
}