Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func _physics_process(delta):
- current_animation = state_machine.get_current_node()
- fall(delta)
- walk()
- jump()
- if movement.y < 0:
- state_machine.travel("jump")
- elif movement.x != 0 and movement.y == 0 :
- state_machine.travel("walk")
- elif movement.y > 0:
- state_machine.travel("fall")
- elif movement.x == 0:
- state_machine.travel("idle")
- hit()
- move_and_slide(movement, UP)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement