extends StateAnimatedActor export (NodePath) var idle_node onready var idle_state: State = get_node(idle_node) func enter() -> void: .enter() move_component.velocity.x = 0 #parent.set_hurtbox(false) #TODO: Error check if timer was actually instanced state_timeout.start() func process_input(_event: InputEvent) -> State: # move_component.wants_jump() move_component.get_movement_direction() return null func process_frame(delta: float) -> State: if state_timeout.time_left == 0: return idle_state return null func process_physics(delta: float) -> State: move_component.velocity.y += gravity * delta #parent.velocity = parent.move_and_slide(parent.velocity, Vector2(0, -1)) move_component.velocity = parent.transform.x * move_speed # if (parent.direction.x > 0): # parent.velocity.x = 1 * move_speed # else: # parent.velocity.x = -1 * move_speed move_component.velocity = parent.move_and_slide(move_component.velocity, Vector2(0, -1)) return null