mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Implemented @Music.ForcePlay command
This commit is contained in:
parent
b6c85bc77d
commit
39f93def95
@ -20,6 +20,18 @@
|
||||
Return Core.Null
|
||||
End Function
|
||||
|
||||
<ScriptCommand("ForcePlay")>
|
||||
<ScriptDescription("Plays music and sets the music loop ignoring last song and without fade-in.")>
|
||||
Private Function M_ForcePlay(ByVal argument As String) As String
|
||||
MusicPlayer.GetInstance().ForcePlay(argument)
|
||||
|
||||
If Screen.Level IsNot Nothing Then
|
||||
Screen.Level.MusicLoop = argument
|
||||
End If
|
||||
|
||||
Return Core.Null
|
||||
End Function
|
||||
|
||||
<ScriptCommand("SetMusicLoop")>
|
||||
<ScriptDescription("Sets the music loop without playing music.")>
|
||||
Private Function M_SetMusicLoop(ByVal argument As String) As String
|
||||
|
@ -327,7 +327,12 @@ Public Class MusicPlayer
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub ForcePlay(ByVal Song As String)
|
||||
_currentSong = "nomusic"
|
||||
_introPlaying = False
|
||||
_introRemaining = TimeSpan.FromSeconds(0)
|
||||
Play(Song, True, 1, 1)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' This stops all music playback.
|
||||
''' </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user