Added key to switch SandboxMode on and off
the key to press is Right Ctrl
This commit is contained in:
parent
27bd072946
commit
b802531748
|
@ -27,6 +27,7 @@ Public Class KeyBindings
|
||||||
Public Shared DisableControllerKey As Keys = Keys.F6
|
Public Shared DisableControllerKey As Keys = Keys.F6
|
||||||
Public Shared FullScreenKey As Keys = Keys.F11
|
Public Shared FullScreenKey As Keys = Keys.F11
|
||||||
Public Shared DebugWalkKey As Keys = Keys.LeftControl
|
Public Shared DebugWalkKey As Keys = Keys.LeftControl
|
||||||
|
Public Shared SandBoxModeSwitchKey As Keys = Keys.RightControl
|
||||||
|
|
||||||
Public Shared EnterKey1 As Keys = Keys.Enter
|
Public Shared EnterKey1 As Keys = Keys.Enter
|
||||||
Public Shared EnterKey2 As Keys = Keys.Space
|
Public Shared EnterKey2 As Keys = Keys.Space
|
||||||
|
@ -85,6 +86,8 @@ Public Class KeyBindings
|
||||||
DebugKey = binding
|
DebugKey = binding
|
||||||
Case "debugwalk"
|
Case "debugwalk"
|
||||||
DebugWalkKey = binding
|
DebugWalkKey = binding
|
||||||
|
Case "sandboxmodeswitch"
|
||||||
|
SandBoxModeSwitchKey = binding
|
||||||
Case "perspectiveswitch"
|
Case "perspectiveswitch"
|
||||||
PerspectiveSwitchKey = binding
|
PerspectiveSwitchKey = binding
|
||||||
Case "fullscreen"
|
Case "fullscreen"
|
||||||
|
|
|
@ -172,6 +172,16 @@ Public Class OverworldCamera
|
||||||
#Region "Update"
|
#Region "Update"
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
|
If GameController.IS_DEBUG_ACTIVE = True Or Core.Player.IsGameJoltSave = False Then
|
||||||
|
If KeyBoardHandler.KeyPressed(KeyBindings.SandBoxModeSwitchKey) = True Then
|
||||||
|
Core.Player.SandBoxMode = Not Core.Player.SandBoxMode
|
||||||
|
If Core.Player.SandBoxMode = True Then
|
||||||
|
Core.GameMessage.ShowMessage(Localization.GetString("game_message_sandbox_mode_on"), 12, FontManager.MainFont, Color.White)
|
||||||
|
Else
|
||||||
|
Core.GameMessage.ShowMessage(Localization.GetString("game_message_sandbox_mode_off"), 12, FontManager.MainFont, Color.White)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
If GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||||
If KeyBoardHandler.KeyPressed(KeyBindings.DebugWalkKey) = True Then
|
If KeyBoardHandler.KeyPressed(KeyBindings.DebugWalkKey) = True Then
|
||||||
|
@ -321,7 +331,7 @@ Public Class OverworldCamera
|
||||||
ThirdPersonOffset.Y += _scrollSpeed * _scrollDirection
|
ThirdPersonOffset.Y += _scrollSpeed * _scrollDirection
|
||||||
ThirdPersonOffset.Z += _scrollSpeed * _scrollDirection
|
ThirdPersonOffset.Z += _scrollSpeed * _scrollDirection
|
||||||
|
|
||||||
If GameController.IS_DEBUG_ACTIVE = False And Core.Player.SandBoxMode = False Then
|
If Core.Player.SandBoxMode = False Then
|
||||||
ThirdPersonOffset.Y = ThirdPersonOffset.Y.Clamp(0, 1.32F)
|
ThirdPersonOffset.Y = ThirdPersonOffset.Y.Clamp(0, 1.32F)
|
||||||
ThirdPersonOffset.Z = ThirdPersonOffset.Z.Clamp(-0.1, 2.7F)
|
ThirdPersonOffset.Z = ThirdPersonOffset.Z.Clamp(-0.1, 2.7F)
|
||||||
End If
|
End If
|
||||||
|
|
Loading…
Reference in New Issue