blob: 9281f0f95adcbffc6e6329ac6da4476bc4e6a5c7 (
plain) (
tree)
|
|
extends Area
const Loader = preload("res://scripts/LevelLoader.gd")
var loader: Loader = null
# Called when the node enters the scene tree for the first time.
func _ready():
loader = get_node("../LevelLoader")
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_Area2_body_entered(body: RigidBody):
# return when body is not a rigidbody
if body == null:
return
loader.load_next_level()
|