aboutsummaryrefslogtreecommitdiffstats
path: root/Nodes
diff options
context:
space:
mode:
authorLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-08 18:17:15 +0200
committerLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-08 18:17:15 +0200
commit179ad5a11b5a5780df494db61ed72baae4b7cec2 (patch)
tree350388f9cb5423b1c9fca0adfed257d97edd1fdc /Nodes
parent516635e22464699fa940ed981a186088352ba734 (diff)
download2023-179ad5a11b5a5780df494db61ed72baae4b7cec2.tar.gz
2023-179ad5a11b5a5780df494db61ed72baae4b7cec2.tar.bz2
2023-179ad5a11b5a5780df494db61ed72baae4b7cec2.zip
resetting level and loading next level
Diffstat (limited to 'Nodes')
-rw-r--r--Nodes/Level_test.tscn5
-rw-r--r--Nodes/Level_test_2.tscn71
-rw-r--r--Nodes/ui.tscn20
3 files changed, 93 insertions, 3 deletions
diff --git a/Nodes/Level_test.tscn b/Nodes/Level_test.tscn
index 80330fd..05fbf4b 100644
--- a/Nodes/Level_test.tscn
+++ b/Nodes/Level_test.tscn
@@ -17,6 +17,8 @@ radius = 18.0278
[node name="Level_test" type="Node2D"]
script = ExtResource("1_0esj3")
+[node name="UI" parent="." instance=ExtResource("8_8u1ba")]
+
[node name="Start" type="TextureButton" parent="."]
offset_left = 787.0
offset_top = 514.0
@@ -66,7 +68,4 @@ position = Vector2(285, 479)
[node name="Checkpoint3" parent="Checkpoints" instance=ExtResource("7_52mhf")]
position = Vector2(517, 172)
-[node name="UI" parent="." instance=ExtResource("8_8u1ba")]
-
-[connection signal="pressed" from="Start" to="DrawNode" method="_start_drawing"]
[connection signal="mouse_entered" from="FinishLine/Area2D" to="DrawNode" method="_end_drawing"]
diff --git a/Nodes/Level_test_2.tscn b/Nodes/Level_test_2.tscn
new file mode 100644
index 0000000..3ea0ac4
--- /dev/null
+++ b/Nodes/Level_test_2.tscn
@@ -0,0 +1,71 @@
+[gd_scene load_steps=11 format=3 uid="uid://b7nxnsf8dirqk"]
+
+[ext_resource type="Script" path="res://Scripts/scene_control.gd" id="1_amd1r"]
+[ext_resource type="PackedScene" uid="uid://c8r6i3bu37ogu" path="res://Nodes/ui.tscn" id="2_veexm"]
+[ext_resource type="Texture2D" uid="uid://5xqahgawme4m" path="res://Assets/start.png" id="3_sl2tq"]
+[ext_resource type="Texture2D" uid="uid://b8vhe5kt6037n" path="res://Assets/end.png" id="4_1x7qu"]
+[ext_resource type="PackedScene" uid="uid://c1mvbh2fwqtkb" path="res://Nodes/car.tscn" id="5_vbxx6"]
+[ext_resource type="Script" path="res://Scripts/drawing.gd" id="6_6cnd6"]
+[ext_resource type="Texture2D" uid="uid://dg3v488vx0oj6" path="res://Assets/checkpoint.png" id="7_alupw"]
+[ext_resource type="PackedScene" uid="uid://wkfai2lvnp7n" path="res://Nodes/checkpoint.tscn" id="8_8dt61"]
+
+[sub_resource type="CircleShape2D" id="CircleShape2D_6g88q"]
+radius = 18.0278
+
+[sub_resource type="Curve2D" id="Curve2D_0exre"]
+
+[node name="Level_test" type="Node2D"]
+script = ExtResource("1_amd1r")
+
+[node name="UI" parent="." instance=ExtResource("2_veexm")]
+
+[node name="Start" type="TextureButton" parent="."]
+offset_left = 329.0
+offset_top = 574.0
+offset_right = 361.0
+offset_bottom = 606.0
+texture_normal = ExtResource("3_sl2tq")
+
+[node name="FinishLine" type="Sprite2D" parent="."]
+position = Vector2(694, 598)
+texture = ExtResource("4_1x7qu")
+
+[node name="Area2D" type="Area2D" parent="FinishLine"]
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="FinishLine/Area2D"]
+shape = SubResource("CircleShape2D_6g88q")
+
+[node name="Car" parent="." instance=ExtResource("5_vbxx6")]
+max_speed = 500
+acceleration = 0.05
+
+[node name="DrawNode" type="Node2D" parent="."]
+script = ExtResource("6_6cnd6")
+
+[node name="TrackLine" type="Line2D" parent="DrawNode"]
+
+[node name="TrackPath" type="Path2D" parent="DrawNode"]
+curve = SubResource("Curve2D_0exre")
+
+[node name="TrackFollower" type="PathFollow2D" parent="DrawNode/TrackPath"]
+
+[node name="Sprite2D" type="Sprite2D" parent="DrawNode/TrackPath/TrackFollower"]
+scale = Vector2(0.604, 0.604)
+texture = ExtResource("7_alupw")
+
+[node name="31005" type="Timer" parent="DrawNode/TrackPath/TrackFollower"]
+wait_time = 0.2
+one_shot = true
+
+[node name="Checkpoints" type="Node" parent="."]
+
+[node name="Checkpoint" parent="Checkpoints" instance=ExtResource("8_8dt61")]
+position = Vector2(1023, 342)
+
+[node name="Checkpoint2" parent="Checkpoints" instance=ExtResource("8_8dt61")]
+position = Vector2(113, 279)
+
+[node name="Checkpoint3" parent="Checkpoints" instance=ExtResource("8_8dt61")]
+position = Vector2(517, 172)
+
+[connection signal="mouse_entered" from="FinishLine/Area2D" to="DrawNode" method="_end_drawing"]
diff --git a/Nodes/ui.tscn b/Nodes/ui.tscn
index aabf0ff..fd035c2 100644
--- a/Nodes/ui.tscn
+++ b/Nodes/ui.tscn
@@ -18,6 +18,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
+mouse_filter = 2
script = ExtResource("1_77hb8")
[node name="InGameUI" type="Control" parent="Control"]
@@ -27,6 +28,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
+mouse_filter = 2
[node name="CurrentTime" type="Label" parent="Control/InGameUI"]
layout_mode = 0
@@ -92,3 +94,21 @@ offset_bottom = 23.0
scale = Vector2(1, 1.02025)
text = "0.00"
label_settings = SubResource("LabelSettings_hw7sw")
+
+[node name="NextLevelButton" type="Button" parent="Control/PostGameUI"]
+layout_mode = 1
+anchors_preset = -1
+anchor_left = 0.3
+anchor_top = 0.7
+anchor_right = 0.45
+anchor_bottom = 0.8
+text = "Next Level"
+
+[node name="RestartButton" type="Button" parent="Control/PostGameUI"]
+layout_mode = 1
+anchors_preset = -1
+anchor_left = 0.55
+anchor_top = 0.7
+anchor_right = 0.7
+anchor_bottom = 0.8
+text = "Retry"