[gd_scene load_steps=10 format=3 uid="uid://0g7qqh7naniv"] [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"] [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"] [ext_resource type="Script" path="res://scripts/label_round.gd" id="5_vheit"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bj1hp"] radius = 8.0 height = 34.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="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="AnimationLibrary" id="AnimationLibrary_55lyd"] _data = { "RESET": SubResource("Animation_3soig"), "show_rounds": SubResource("Animation_wl2vo") } [node name="Car" type="Node2D"] script = ExtResource("1_0tin3") [node name="CharacterBody_Car" type="CharacterBody2D" parent="."] motion_mode = 1 script = ExtResource("1_i5tet") [node name="sprite_features" type="Sprite2D" parent="CharacterBody_Car"] z_index = 10 scale = Vector2(0.5, 0.5) texture = ExtResource("3_ts6mm") [node name="sprite_body" type="Sprite2D" parent="CharacterBody_Car"] z_index = 10 scale = Vector2(0.5, 0.5) texture = ExtResource("4_lps13") [node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody_Car"] rotation = -1.57079 shape = SubResource("CapsuleShape2D_bj1hp") [node name="RayCast_FL" type="RayCast2D" parent="CharacterBody_Car"] target_position = Vector2(256, -128) collision_mask = 2 [node name="RayCast_FR" type="RayCast2D" parent="CharacterBody_Car"] target_position = Vector2(256, 128) collision_mask = 2 [node name="resetTimer" type="Timer" parent="CharacterBody_Car"] one_shot = true [node name="RayCast_Car" type="RayCast2D" parent="CharacterBody_Car"] position = Vector2(-15, 0) target_position = Vector2(31, 0) collision_mask = 12 collide_with_areas = true [node name="collisionEnableTimer" type="Timer" parent="CharacterBody_Car"] wait_time = 0.1 one_shot = true [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") } [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"]