extends "res://src/templates/Actor/states/idle.gd"


func enter() -> void:
	.enter()
#	parent.set_hurtbox(true)
	move_component.velocity.x = 0
	state_timeout.start()
	

func process_physics(delta: float) -> State:

#	parent.velocity.y += gravity * delta
#	#parent.velocity = parent.move_and_slide(parent.velocity, Vector2(0, -1))
#	parent.velocity.x = move_component.desired_movement_vector.x * move_speed
#	parent.velocity = parent.move_and_slide(parent.velocity, Vector2(0, -1))
	
	if state_timeout.time_left == 0:
		move_actor_as_desired(delta)
	
	if move_component.velocity.x != 0.0:
		return move_state

	if !parent.is_on_floor():
		return fall_state
	return null
