basic command blocks now working
This commit is contained in:
parent
220ca2886f
commit
52426368b1
15 changed files with 235 additions and 14 deletions
|
|
@ -37,10 +37,12 @@ func _process(delta):
|
|||
print("Tick: " + str(current_tick))
|
||||
for i in pedestals.size():
|
||||
if i+1 == current_tick:
|
||||
pedestals[i].mesh.mesh.material = pedestal_on_mat
|
||||
else:
|
||||
pass
|
||||
#pedestals[i].mesh.material
|
||||
var activated_pedestal = pedestals[i]
|
||||
activated_pedestal.mesh.mesh.material = pedestal_on_mat
|
||||
if activated_pedestal.has_command:
|
||||
print("broadcasting: " + activated_pedestal.placed_command.command_name)
|
||||
broadcast.emit(activated_pedestal.placed_command.command_name)
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue