summaryrefslogtreecommitdiffstats
path: root/scripts/Ladder.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2020-07-30 22:44:44 +0300
committerJan Tuomi <jan.tuomi@valuemotive.com>2020-07-30 22:44:44 +0300
commit1c7db0e243d2a8a93d19d953ab656610aa4ea1b4 (patch)
treeb54d98eb99f82582eaca9d99ee2b0879fd3dabb0 /scripts/Ladder.gd
parentd07037aa7ffb18b3219f1a73b1d8ef8b04be915c (diff)
Make ladders work
Diffstat (limited to 'scripts/Ladder.gd')
-rw-r--r--scripts/Ladder.gd4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/Ladder.gd b/scripts/Ladder.gd
index ea4265d..c21752b 100644
--- a/scripts/Ladder.gd
+++ b/scripts/Ladder.gd
@@ -1,5 +1,6 @@
extends Area2D
+export (int) var target_scene_num
# Declare member variables here. Examples:
# var a = 2
@@ -17,4 +18,5 @@ func _ready():
func _on_Ladder_body_entered(body):
if body is PlayerCharacter:
- body.change_level()
+ var player: PlayerCharacter = body
+ player.change_level(target_scene_num)