From 5b1a456768f0072e10577f52914898473385e72b Mon Sep 17 00:00:00 2001 From: perivesta <> Date: Sun, 9 Jul 2023 15:29:18 +0200 Subject: add sprites --- Nodes/checkpoint.tscn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Nodes') diff --git a/Nodes/checkpoint.tscn b/Nodes/checkpoint.tscn index 0f76bc6..458f121 100644 --- a/Nodes/checkpoint.tscn +++ b/Nodes/checkpoint.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=4 format=3 uid="uid://wkfai2lvnp7n"] [ext_resource type="Script" path="res://Scripts/Checkpoint.gd" id="1_fwyov"] -[ext_resource type="Texture2D" uid="uid://dg3v488vx0oj6" path="res://Assets/checkpoint.png" id="2_0dl7u"] +[ext_resource type="Texture2D" uid="uid://2jhabylue78s" path="res://Assets/Images/checkpoint_open.png" id="2_62gva"] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_f8epl"] -size = Vector2(32, 32) +[sub_resource type="CircleShape2D" id="CircleShape2D_q6wen"] +radius = 17.0294 [node name="Checkpoint" type="Node2D"] script = ExtResource("1_fwyov") @@ -12,9 +12,9 @@ script = ExtResource("1_fwyov") [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -shape = SubResource("RectangleShape2D_f8epl") +shape = SubResource("CircleShape2D_q6wen") [node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("2_0dl7u") +texture = ExtResource("2_62gva") [connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] -- cgit From 0c0674dc05d71ab156b7077f4415b78135d7c1cc Mon Sep 17 00:00:00 2001 From: perivesta <> Date: Sun, 9 Jul 2023 15:45:42 +0200 Subject: more sprites --- Nodes/Level_test_2.tscn | 61 ------------------------------------------------- Nodes/car.tscn | 9 ++++---- Nodes/checkpoint.tscn | 9 ++++++-- 3 files changed, 12 insertions(+), 67 deletions(-) delete mode 100644 Nodes/Level_test_2.tscn (limited to 'Nodes') diff --git a/Nodes/Level_test_2.tscn b/Nodes/Level_test_2.tscn deleted file mode 100644 index fff7252..0000000 --- a/Nodes/Level_test_2.tscn +++ /dev/null @@ -1,61 +0,0 @@ -[gd_scene load_steps=10 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="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")] - -[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"] -loop = false - -[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/car.tscn b/Nodes/car.tscn index dbfb4e1..c3eb2a6 100644 --- a/Nodes/car.tscn +++ b/Nodes/car.tscn @@ -1,17 +1,18 @@ [gd_scene load_steps=4 format=3 uid="uid://c1mvbh2fwqtkb"] [ext_resource type="Script" path="res://Scripts/car_behaviour.gd" id="1_0e4ux"] - -[sub_resource type="CanvasTexture" id="CanvasTexture_aacgf"] +[ext_resource type="Texture2D" uid="uid://cjb81lukqo6n4" path="res://Assets/Images/car2.png" id="2_wteha"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_wvlyu"] +size = Vector2(32, 14) [node name="Car" type="CharacterBody2D"] script = ExtResource("1_0e4ux") [node name="Sprite2D" type="Sprite2D" parent="."] -scale = Vector2(19.92, 19.76) -texture = SubResource("CanvasTexture_aacgf") +visible = false +rotation = 1.5708 +texture = ExtResource("2_wteha") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_wvlyu") diff --git a/Nodes/checkpoint.tscn b/Nodes/checkpoint.tscn index 458f121..5d95f7a 100644 --- a/Nodes/checkpoint.tscn +++ b/Nodes/checkpoint.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=4 format=3 uid="uid://wkfai2lvnp7n"] +[gd_scene load_steps=5 format=3 uid="uid://wkfai2lvnp7n"] [ext_resource type="Script" path="res://Scripts/Checkpoint.gd" id="1_fwyov"] [ext_resource type="Texture2D" uid="uid://2jhabylue78s" path="res://Assets/Images/checkpoint_open.png" id="2_62gva"] +[ext_resource type="Texture2D" uid="uid://c016iy5c3e472" path="res://Assets/Images/checkpoint_closed_2.png" id="3_ud10i"] [sub_resource type="CircleShape2D" id="CircleShape2D_q6wen"] radius = 17.0294 @@ -14,7 +15,11 @@ script = ExtResource("1_fwyov") [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] shape = SubResource("CircleShape2D_q6wen") -[node name="Sprite2D" type="Sprite2D" parent="."] +[node name="Sprite2Dopen" type="Sprite2D" parent="."] texture = ExtResource("2_62gva") +[node name="Sprite2Dclosed" type="Sprite2D" parent="."] +visible = false +texture = ExtResource("3_ud10i") + [connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] -- cgit From 317e16b1f99036275ac27f850314df5a965526a9 Mon Sep 17 00:00:00 2001 From: perivesta <> Date: Sun, 9 Jul 2023 15:53:42 +0200 Subject: thank u ice very cool --- Nodes/car.tscn | 1 - 1 file changed, 1 deletion(-) (limited to 'Nodes') diff --git a/Nodes/car.tscn b/Nodes/car.tscn index c3eb2a6..a65ae7b 100644 --- a/Nodes/car.tscn +++ b/Nodes/car.tscn @@ -10,7 +10,6 @@ size = Vector2(32, 14) script = ExtResource("1_0e4ux") [node name="Sprite2D" type="Sprite2D" parent="."] -visible = false rotation = 1.5708 texture = ExtResource("2_wteha") -- cgit