Fix many screens not playing levelmusic when exit

This commit is contained in:
JappaWakka 2024-02-21 17:07:31 +01:00
parent 29a790c477
commit b36a1f2bd3
2 changed files with 8 additions and 1 deletions

View File

@ -426,7 +426,6 @@
#End Region
Private Sub CloseScreen()
MusicManager.Play(Screen.Level.MusicLoop, True, 0.01F)
Core.SetScreen(New TransitionScreen(Me, Me.PreScreen, Color.White, False))
End Sub

View File

@ -71,6 +71,14 @@
Public Overrides Sub Update()
If reduce = False Then
Dim s As Screen = NewScreen
While s.Identification <> Identifications.OverworldScreen AndAlso s.PreScreen IsNot Nothing
s = s.PreScreen
End While
If s.Identification = Identifications.OverworldScreen Then
MusicManager.Play(Screen.Level.MusicLoop, True, 0.01F)
End If
alpha += Speed
If OldScreen.UpdateFadeOut = True Then
OldScreen.Update()