mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 07:44:31 +02:00
BattleScreen + BattleCatchScreen softlock fixes
This commit is contained in:
parent
9970d892de
commit
dfbaaf2b33
@ -7,11 +7,18 @@
|
||||
Moves
|
||||
End Enum
|
||||
|
||||
Public CanInteract As Boolean = True
|
||||
Public MenuState As MenuStates = MenuStates.Main
|
||||
Public Visible As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
Me.Reset()
|
||||
Dim blockinteractscreen() As Screen.Identifications = {Screen.Identifications.PartyScreen, Screen.Identifications.SummaryScreen, Screen.Identifications.PauseScreen, Screen.Identifications.ChatScreen}
|
||||
If blockinteractscreen.Contains(Core.CurrentScreen.Identification) = True Then
|
||||
CanInteract = False
|
||||
Else
|
||||
CanInteract = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Reset()
|
||||
@ -193,9 +200,9 @@
|
||||
End If
|
||||
|
||||
Dim cX As Integer = 0
|
||||
If HPpercentage <= 50.0F And HPpercentage > 15.0F Then
|
||||
If HPpercentage <= 75.0F And HPpercentage > 25.0F Then
|
||||
cX = 2
|
||||
ElseIf HPpercentage <= 15.0F Then
|
||||
ElseIf HPpercentage <= 25.0F Then
|
||||
cX = 4
|
||||
End If
|
||||
|
||||
@ -307,12 +314,14 @@
|
||||
End Sub
|
||||
|
||||
Public Sub Update(ByRef BattleScreen As BattleScreen)
|
||||
Select Case MenuState
|
||||
Case MenuStates.Main
|
||||
UpdateMainMenu(BattleScreen)
|
||||
Case MenuStates.Moves
|
||||
UpdateMoveMenu(BattleScreen)
|
||||
End Select
|
||||
If CanInteract = True Then
|
||||
Select Case MenuState
|
||||
Case MenuStates.Main
|
||||
UpdateMainMenu(BattleScreen)
|
||||
Case MenuStates.Moves
|
||||
UpdateMoveMenu(BattleScreen)
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private _allItemsExtended As Integer = 0
|
||||
|
@ -1025,11 +1025,13 @@ nextIndexForeground:
|
||||
End If
|
||||
|
||||
Lighting.UpdateLighting(Screen.Effect)
|
||||
Camera.Update()
|
||||
Level.Update()
|
||||
If IsCurrentScreen() = True Then
|
||||
Camera.Update()
|
||||
|
||||
SkyDome.Update()
|
||||
Level.Update()
|
||||
|
||||
SkyDome.Update()
|
||||
End If
|
||||
TextBox.Update()
|
||||
If TextBox.Showing = False Then
|
||||
Dim cIndex As Integer = 0
|
||||
|
@ -58,9 +58,11 @@
|
||||
Me._textIndex = Me._text.Length
|
||||
End If
|
||||
Else
|
||||
If Controls.Accept(True, True) = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
Me._ready = True
|
||||
If CurrentScreen.Identification <> Screen.Identifications.PauseScreen AndAlso CurrentScreen.Identification <> Screen.Identifications.ChatScreen Then
|
||||
If Controls.Accept(True, True) = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
Me._ready = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
@ -61,9 +61,11 @@ Public Class ChatScreen
|
||||
'Updates the level screen so online player entities get drawn.
|
||||
If PreScreen.Identification = Identifications.OverworldScreen And JoinServerScreen.Online = True Then
|
||||
Screen.Level.Update()
|
||||
End If
|
||||
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||
ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||
PreScreen.Update()
|
||||
ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then
|
||||
PreScreen.Update()
|
||||
CType(PreScreen, BattleCatchScreen).UpdateAnimations()
|
||||
End If
|
||||
|
||||
If CursorDelay > 0 Then
|
||||
|
@ -587,6 +587,9 @@ Public Class NewInventoryScreen
|
||||
End Function
|
||||
|
||||
Public Overrides Sub Update()
|
||||
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||
PreScreen.Update()
|
||||
End If
|
||||
'Updates the tab highlight:
|
||||
For index = 0 To _tabHighlight.Length - 1
|
||||
If index <> _tabIndex Then
|
||||
|
@ -82,7 +82,10 @@
|
||||
If PreScreen.Identification = Identifications.OverworldScreen Then
|
||||
Screen.Level.Update()
|
||||
ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then
|
||||
PreScreen.Update()
|
||||
CType(PreScreen, BattleCatchScreen).UpdateAnimations()
|
||||
ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||
PreScreen.Update()
|
||||
End If
|
||||
|
||||
Screen.TextBox.reDelay = 0.0F
|
||||
|
@ -420,6 +420,9 @@ Public Class PartyScreen
|
||||
End Function
|
||||
|
||||
Public Overrides Sub Update()
|
||||
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||
PreScreen.Update()
|
||||
End If
|
||||
If _pokemonAnimations.Count > 0 Then
|
||||
Dim animation As PokemonAnimation = _pokemonAnimations(_index)
|
||||
If animation._shakeLeft Then
|
||||
|
@ -593,6 +593,9 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Update()
|
||||
If PreScreen.PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||
PreScreen.PreScreen.Update()
|
||||
End If
|
||||
If _closing = True Then
|
||||
If _fadeIn > 0F Then
|
||||
_fadeIn = MathHelper.Lerp(0, _fadeIn, 0.8F)
|
||||
|
Loading…
x
Reference in New Issue
Block a user