level_end.gd 385 B

1234567891011
  1. extends Area2D
  2. func _on_area_entered(_player: Area2D) -> void:
  3. get_tree().change_scene_to_file("res://scenes/level_select/level_select.tscn")
  4. func _input(event: InputEvent) -> void:
  5. if event is InputEventMouseButton and event.pressed:
  6. if $Sprite2D.get_rect().has_point(to_local(event.position)):
  7. get_tree().change_scene_to_file("res://scenes/level_select/level_select.tscn")