extends Node2D

@export var is_enabled = true # set to disabled for keydoors!

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	pass


func _on_area_which_teleports_player_into_room_body_entered(body: Node2D) -> void:
	if !is_enabled:
		return
	# TODO: add some kind of animation
	if (!$TeleportSfx.playing):
		$TeleportSfx.play()
	get_parent().teleportPlayer(body)
	pass # Replace with function body.


func _on_area_to_start_emit_body_entered(_body: Node2D) -> void:
	if !is_enabled:
		return
	$GPUParticles2D.emitting = true
	pass # Replace with function body.


func _on_area_to_start_emit_body_exited(_body: Node2D) -> void:
	if !is_enabled:
		return
	$GPUParticles2D.emitting = false
	pass # Replace with function body.
