Feat/1 movement foundation #5
@@ -41,6 +41,8 @@ func _ready() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
|
var fsm_node = _machine.get_node("MovementStateMachine")
|
||||||
|
if fsm_node and fsm_node.has_method("switch_to"):
|
||||||
_machine.input_jump_just_pressed = Input.is_action_just_pressed("jump") and not _machine.input_jump_pressed
|
_machine.input_jump_just_pressed = Input.is_action_just_pressed("jump") and not _machine.input_jump_pressed
|
||||||
_machine.input_jump_pressed = Input.is_action_pressed("jump")
|
_machine.input_jump_pressed = Input.is_action_pressed("jump")
|
||||||
_machine.input_sprint = Input.is_action_pressed("sprint")
|
_machine.input_sprint = Input.is_action_pressed("sprint")
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
extends Node
|
||||||
|
class_name MovementRunner
|
||||||
|
|
||||||
|
## Run: godot --headless --path . --script movement/tests/test_fsm_runner.gd
|
||||||
|
## This file exists only as the runnable verifier entrypoint documented by the skill.
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var script_path := "res://movement/tests/test_fsm_runner.gd"
|
||||||
|
var runner = load(script_path).new()
|
||||||
|
if runner and runner.has_method("run_all"):
|
||||||
|
runner.run_all()
|
||||||
|
get_tree().quit(0)
|
||||||
Reference in New Issue
Block a user