mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38: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:
@@ -15,3 +15,11 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
state.update(delta)
|
||||
|
||||
func get_state() -> String:
|
||||
if (state != null):
|
||||
return state.name
|
||||
return ""
|
||||
|
||||
func is_state(state_to_check := "") -> bool:
|
||||
return get_state() == state_to_check
|
||||
|
Reference in New Issue
Block a user