2024-11-09 13:27:34 +00:00
|
|
|
[gd_scene load_steps=10 format=3 uid="uid://0g7qqh7naniv"]
|
2024-11-03 18:16:30 +00:00
|
|
|
|
|
|
|
[ext_resource type="Script" path="res://scripts/car_node.gd" id="1_0tin3"]
|
|
|
|
[ext_resource type="Script" path="res://scripts/car.gd" id="1_i5tet"]
|
2024-11-04 18:55:13 +00:00
|
|
|
[ext_resource type="Texture2D" uid="uid://mqdujngircok" path="res://sprites/car_features.png" id="3_ts6mm"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://e5aeyl47wi8p" path="res://sprites/car_body.png" id="4_lps13"]
|
2024-11-09 13:27:34 +00:00
|
|
|
[ext_resource type="Script" path="res://scripts/label_round.gd" id="5_vheit"]
|
2024-11-03 18:16:30 +00:00
|
|
|
|
|
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bj1hp"]
|
|
|
|
radius = 8.0
|
|
|
|
height = 34.0
|
|
|
|
|
2024-11-09 13:27:34 +00:00
|
|
|
[sub_resource type="Animation" id="Animation_wl2vo"]
|
|
|
|
resource_name = "show_rounds"
|
|
|
|
length = 3.0
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("label_round:self_modulate")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0.133333, 0.533333, 1.5, 2.5),
|
|
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
|
|
|
"update": 0,
|
|
|
|
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_3soig"]
|
|
|
|
length = 0.001
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("label_round:self_modulate")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0),
|
|
|
|
"transitions": PackedFloat32Array(1),
|
|
|
|
"update": 0,
|
|
|
|
"values": [Color(1, 1, 1, 1)]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_55lyd"]
|
|
|
|
_data = {
|
|
|
|
"RESET": SubResource("Animation_3soig"),
|
|
|
|
"show_rounds": SubResource("Animation_wl2vo")
|
|
|
|
}
|
|
|
|
|
2024-11-03 18:16:30 +00:00
|
|
|
[node name="Car" type="Node2D"]
|
|
|
|
script = ExtResource("1_0tin3")
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="CharacterBody_Car" type="CharacterBody2D" parent="."]
|
|
|
|
motion_mode = 1
|
2024-11-03 18:16:30 +00:00
|
|
|
script = ExtResource("1_i5tet")
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="sprite_features" type="Sprite2D" parent="CharacterBody_Car"]
|
2024-11-03 18:16:30 +00:00
|
|
|
z_index = 10
|
|
|
|
scale = Vector2(0.5, 0.5)
|
2024-11-04 18:55:13 +00:00
|
|
|
texture = ExtResource("3_ts6mm")
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="sprite_body" type="Sprite2D" parent="CharacterBody_Car"]
|
2024-11-04 18:55:13 +00:00
|
|
|
z_index = 10
|
|
|
|
scale = Vector2(0.5, 0.5)
|
|
|
|
texture = ExtResource("4_lps13")
|
2024-11-03 18:16:30 +00:00
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody_Car"]
|
2024-11-03 18:16:30 +00:00
|
|
|
rotation = -1.57079
|
|
|
|
shape = SubResource("CapsuleShape2D_bj1hp")
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="RayCast_FL" type="RayCast2D" parent="CharacterBody_Car"]
|
2024-11-03 18:16:30 +00:00
|
|
|
target_position = Vector2(256, -128)
|
|
|
|
collision_mask = 2
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="RayCast_FR" type="RayCast2D" parent="CharacterBody_Car"]
|
2024-11-03 18:16:30 +00:00
|
|
|
target_position = Vector2(256, 128)
|
|
|
|
collision_mask = 2
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="resetTimer" type="Timer" parent="CharacterBody_Car"]
|
2024-11-03 18:16:30 +00:00
|
|
|
one_shot = true
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="RayCast_Car" type="RayCast2D" parent="CharacterBody_Car"]
|
2024-11-03 18:16:30 +00:00
|
|
|
position = Vector2(-15, 0)
|
|
|
|
target_position = Vector2(31, 0)
|
2024-11-05 07:18:14 +00:00
|
|
|
collision_mask = 12
|
|
|
|
collide_with_areas = true
|
2024-11-03 18:16:30 +00:00
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[node name="collisionEnableTimer" type="Timer" parent="CharacterBody_Car"]
|
|
|
|
wait_time = 0.1
|
|
|
|
one_shot = true
|
|
|
|
|
2024-11-09 13:27:34 +00:00
|
|
|
[node name="label_round" type="Label" parent="CharacterBody_Car"]
|
|
|
|
z_index = 10
|
|
|
|
offset_left = -52.0
|
|
|
|
offset_top = -12.0
|
|
|
|
offset_right = -12.0
|
|
|
|
offset_bottom = 12.0
|
|
|
|
pivot_offset = Vector2(20, 12)
|
|
|
|
text = "3/3"
|
|
|
|
horizontal_alignment = 1
|
|
|
|
vertical_alignment = 1
|
|
|
|
script = ExtResource("5_vheit")
|
|
|
|
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="CharacterBody_Car"]
|
|
|
|
libraries = {
|
|
|
|
"": SubResource("AnimationLibrary_55lyd")
|
|
|
|
}
|
|
|
|
|
2024-11-04 20:56:07 +00:00
|
|
|
[connection signal="timeout" from="CharacterBody_Car/resetTimer" to="CharacterBody_Car" method="_on_reset_timer_timeout"]
|
|
|
|
[connection signal="timeout" from="CharacterBody_Car/collisionEnableTimer" to="CharacterBody_Car" method="_on_collision_enable_timer_timeout"]
|