18 lines
456 B
GDScript
18 lines
456 B
GDScript
extends Node2D
|
|
|
|
@export var next_map:PackedScene
|
|
|
|
# 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_2d_body_entered(body: Node2D) -> void:
|
|
if body is Player:
|
|
SceneManager.current_scene = next_map.instantiate()
|
|
SceneManager.win_sound.play()
|