basic command blocks now working

This commit is contained in:
Clevertop 2024-08-10 22:37:32 +10:00
parent 220ca2886f
commit 52426368b1
15 changed files with 235 additions and 14 deletions

View file

@ -24,9 +24,9 @@ func _physics_process(delta):
if not is_on_floor():
velocity.y -= gravity * delta
# Handle jump.
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
# Handle jump. # now handled by chronos
#if Input.is_action_just_pressed("jump") and is_on_floor():
#velocity.y = JUMP_VELOCITY
#free the mouse for debugging
if Input.is_action_just_pressed("esc"):
@ -99,3 +99,11 @@ func drop():
held_object.freeze = false
has_object = false
func _on_chrono_manager_broadcast(command):
match command:
"jump":
velocity.y = JUMP_VELOCITY
_:
printerr("bad command sent")