[gd_scene load_steps=6 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"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bj1hp"] radius = 8.0 height = 34.0 [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 [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"]