extends RoomState


var follow: bool


func _enter(_previous_state_path: String, _data: Dictionary = {}) -> void:
	print("entering room gameplay")
	get_tree().paused = false
	follow = room.config.follow_player


func _handle_input(event: InputEvent) -> void:
	if event.is_action_pressed("pause"):
		finished.emit(PAUSED)


func _state_physics_update(delta: float) -> void:
	if follow: room.camera.follow_player(delta)
