mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
[QoL] Noclip can be toggled, works w/o debug in leveltesting, some convenience functions. (#621)
* Some state machine functions to make code tidier in the future * Added a function to Global to check if we're playtesting, for convenience * Only allow noclip w/o debug in leveltesting, toggling added, kept jump key to exit
This commit is contained in:
@@ -13,9 +13,6 @@ func enter(_msg := {}) -> void:
|
||||
func physics_update(_delta: float) -> void:
|
||||
player.velocity = Input.get_vector("move_left_0", "move_right_0", "move_up_0", "move_down_0") * (FAST_SPEED if Input.is_action_pressed("run_0") else SLOW_SPEED)
|
||||
player.move_and_slide()
|
||||
if Input.is_action_just_pressed("jump_0"):
|
||||
state_machine.transition_to("Normal")
|
||||
Global.log_comment("NOCLIP Disabled")
|
||||
|
||||
func exit() -> void:
|
||||
player.can_hurt = false
|
||||
|
Reference in New Issue
Block a user