From 98a089669678984edaf6ef37d5a0c463962b007b Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sun, 17 Jul 2022 01:01:02 +0200 Subject: simple scoreboard --- godot/scripts/GoalTriggerBox.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'godot/scripts/GoalTriggerBox.gd') diff --git a/godot/scripts/GoalTriggerBox.gd b/godot/scripts/GoalTriggerBox.gd index 17e98ad..42345d8 100644 --- a/godot/scripts/GoalTriggerBox.gd +++ b/godot/scripts/GoalTriggerBox.gd @@ -1,11 +1,11 @@ extends Area -const Loader = preload("res://scripts/LevelLoader.gd") +const Loader = preload("res://scenes/Game.gd") var loader: Loader = null # Called when the node enters the scene tree for the first time. func _ready(): - loader = get_node("/root/Game/LevelLoader") + loader = get_node("/root/Game") # Called every frame. 'delta' is the elapsed time since the previous frame. -- cgit From 8b932533e6d25a80f185bae299351426a4ca157e Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sun, 17 Jul 2022 02:44:50 +0200 Subject: post game behaviour --- godot/scripts/GoalTriggerBox.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'godot/scripts/GoalTriggerBox.gd') diff --git a/godot/scripts/GoalTriggerBox.gd b/godot/scripts/GoalTriggerBox.gd index 42345d8..6e1034b 100644 --- a/godot/scripts/GoalTriggerBox.gd +++ b/godot/scripts/GoalTriggerBox.gd @@ -18,5 +18,5 @@ func _on_Area2_body_entered(body: RigidBody): if body == null: return - loader.load_next_level() + loader.end_level() -- cgit