Added some debug messages (they are commented in OverworldCamera.vb). Small changes.
This commit is contained in:
parent
848482c031
commit
9cb32c3cc5
|
@ -147,9 +147,6 @@
|
||||||
Public Sub Update(ByVal gameTime As GameTime)
|
Public Sub Update(ByVal gameTime As GameTime)
|
||||||
Core.GameTime = gameTime
|
Core.GameTime = gameTime
|
||||||
|
|
||||||
KeyBoardHandler.Update()
|
|
||||||
ControllerHandler.Update()
|
|
||||||
|
|
||||||
ConnectScreen.UpdateConnectSet()
|
ConnectScreen.UpdateConnectSet()
|
||||||
|
|
||||||
If Core.GameInstance.IsActive = False Then
|
If Core.GameInstance.IsActive = False Then
|
||||||
|
@ -157,6 +154,10 @@
|
||||||
Core.SetScreen(New PauseScreen(Core.CurrentScreen))
|
Core.SetScreen(New PauseScreen(Core.CurrentScreen))
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
KeyBoardHandler.Update()
|
||||||
|
ControllerHandler.Update()
|
||||||
|
Controls.MakeMouseVisible()
|
||||||
|
MouseHandler.Update()
|
||||||
If KeyBoardHandler.KeyPressed(KeyBindings.EscapeKey) = True Or ControllerHandler.ButtonDown(Buttons.Start) = True Then
|
If KeyBoardHandler.KeyPressed(KeyBindings.EscapeKey) = True Or ControllerHandler.ButtonDown(Buttons.Start) = True Then
|
||||||
CurrentScreen.EscapePressed()
|
CurrentScreen.EscapePressed()
|
||||||
End If
|
End If
|
||||||
|
@ -175,9 +176,6 @@
|
||||||
MusicManager.Update()
|
MusicManager.Update()
|
||||||
|
|
||||||
GameMessage.Update()
|
GameMessage.Update()
|
||||||
Controls.MakeMouseVisible()
|
|
||||||
|
|
||||||
MouseHandler.Update()
|
|
||||||
|
|
||||||
LoadingDots.Update()
|
LoadingDots.Update()
|
||||||
ForcedCrash.Update()
|
ForcedCrash.Update()
|
||||||
|
|
|
@ -29,6 +29,9 @@ Public Class OverworldCamera
|
||||||
Public YawLocked As Boolean = False
|
Public YawLocked As Boolean = False
|
||||||
Public ThirdPersonOffset As Vector3 = New Vector3(0F, 0.3F, 1.5F)
|
Public ThirdPersonOffset As Vector3 = New Vector3(0F, 0.3F, 1.5F)
|
||||||
|
|
||||||
|
'Debug variables
|
||||||
|
Public oldDate As Date = Date.Now
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Properties"
|
#Region "Properties"
|
||||||
|
@ -193,6 +196,7 @@ Public Class OverworldCamera
|
||||||
Private Sub ControlCamera()
|
Private Sub ControlCamera()
|
||||||
Dim mState As MouseState = Mouse.GetState()
|
Dim mState As MouseState = Mouse.GetState()
|
||||||
Dim gState As GamePadState = GamePad.GetState(PlayerIndex.One)
|
Dim gState As GamePadState = GamePad.GetState(PlayerIndex.One)
|
||||||
|
Dim text As String = ""
|
||||||
|
|
||||||
Dim dx As Single = mState.X - oldX
|
Dim dx As Single = mState.X - oldX
|
||||||
If gState.ThumbSticks.Right.X <> 0.0F And Core.GameOptions.GamePadEnabled = True Then
|
If gState.ThumbSticks.Right.X <> 0.0F And Core.GameOptions.GamePadEnabled = True Then
|
||||||
|
@ -204,7 +208,7 @@ Public Class OverworldCamera
|
||||||
dy = gState.ThumbSticks.Right.Y * 40.0F * -1.0F
|
dy = gState.ThumbSticks.Right.Y * 40.0F * -1.0F
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If _isFixed = False Then
|
If _isFixed = False AndAlso (dx <> 0 OrElse dy <> 0) Then
|
||||||
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
|
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
|
||||||
Dim OS As OverworldScreen = CType(CurrentScreen, OverworldScreen)
|
Dim OS As OverworldScreen = CType(CurrentScreen, OverworldScreen)
|
||||||
|
|
||||||
|
@ -216,8 +220,12 @@ Public Class OverworldCamera
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Pitch += -RotationSpeed * dy
|
Pitch += -RotationSpeed * dy
|
||||||
|
'text = " (Moving)"
|
||||||
End If
|
End If
|
||||||
|
'Dim interval As TimeSpan
|
||||||
|
'interval = Date.Now - oldDate
|
||||||
|
'Logger.Debug("ControlCamera: " & interval.Milliseconds.ToString & " ms" & text)
|
||||||
|
'oldDate = Date.Now
|
||||||
ClampYaw()
|
ClampYaw()
|
||||||
ClampPitch()
|
ClampPitch()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue