extends Area2D

@export var mud_time: float = 0.0


func _ready() -> void:
	area_entered.connect(_on_area_entered)
	area_exited.connect(_on_area_exited)


func _on_area_entered(area: Area2D) -> void:
	if area.has_method(&"mud_effect"):
		area.mud_effect(mud_time)


func _on_area_exited(area: Area2D) -> void:
	if area.has_method(&"mud_exited"):
		area.mud_exited()
