mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-31 01:35:20 +02:00
Implemented @Music.ForcePlay command
This commit is contained in:
parent
b6c85bc77d
commit
39f93def95
@ -20,6 +20,18 @@
|
|||||||
Return Core.Null
|
Return Core.Null
|
||||||
End Function
|
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")>
|
<ScriptCommand("SetMusicLoop")>
|
||||||
<ScriptDescription("Sets the music loop without playing music.")>
|
<ScriptDescription("Sets the music loop without playing music.")>
|
||||||
Private Function M_SetMusicLoop(ByVal argument As String) As String
|
Private Function M_SetMusicLoop(ByVal argument As String) As String
|
||||||
|
@ -327,7 +327,12 @@ Public Class MusicPlayer
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
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>
|
''' <summary>
|
||||||
''' This stops all music playback.
|
''' This stops all music playback.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user