aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/scene_control.gd
diff options
context:
space:
mode:
authorLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-09 13:59:48 +0200
committerLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-09 13:59:48 +0200
commita6cf1d882adec3c34b809c832615fefab924e870 (patch)
treee2362fa21c2b2df7123508961d2e25bdd18d90b5 /Scripts/scene_control.gd
parentd6cdfb1b7e40890f6521f67198d13d2c575a90f2 (diff)
download2023-a6cf1d882adec3c34b809c832615fefab924e870.tar.gz
2023-a6cf1d882adec3c34b809c832615fefab924e870.tar.bz2
2023-a6cf1d882adec3c34b809c832615fefab924e870.zip
template level & setting offset to the start button so the car is in the middle
Diffstat (limited to '')
-rw-r--r--Scripts/scene_control.gd6
1 files changed, 3 insertions, 3 deletions
diff --git a/Scripts/scene_control.gd b/Scripts/scene_control.gd
index ce3332f..73d9273 100644
--- a/Scripts/scene_control.gd
+++ b/Scripts/scene_control.gd
@@ -8,12 +8,12 @@ class_name SceneControl
@onready var checkpoints = $Checkpoints.get_children()
@onready var ui = $UI/Control
@onready var drawing = $DrawNode
+@onready var start = $Start
var is_driving = false
var current_time = 0.0
var game_control
-var start
func _ready():
@@ -23,8 +23,8 @@ func _ready():
$UI/Control/PostGameUI/RestartButton.pressed.connect(reset_level)
$UI/Control/PostGameUI/NextLevelButton.pressed.connect(next_level)
- start = $Start as TextureButton
- start.pressed.connect(start_drawing)
+ var start_button = $Start/Start as TextureButton
+ start_button.pressed.connect(start_drawing)
reset_level()