Add lua support for playing background music

This commit is contained in:
abcdefg30
2015-10-12 14:42:59 +02:00
parent 76ada5176f
commit 4afef8868e
2 changed files with 20 additions and 0 deletions

View File

@@ -168,6 +168,14 @@ namespace OpenRA.Mods.Common.Traits
Game.Sound.PlayMusicThen(music, onComplete);
}
public void SetBackgroundMusic(MusicInfo music)
{
currentBackgroundSong = music;
if (CurrentSongIsBackground)
Stop();
}
public MusicInfo GetNextSong()
{
return GetSong(false);