From a6cf1d882adec3c34b809c832615fefab924e870 Mon Sep 17 00:00:00 2001 From: IcECreAm777 Date: Sun, 9 Jul 2023 13:59:48 +0200 Subject: template level & setting offset to the start button so the car is in the middle --- Scripts/scene_control.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Scripts/scene_control.gd') 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() -- cgit