43 lines
1.3 KiB
Text
43 lines
1.3 KiB
Text
[gd_scene load_steps=5 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://c2wq5xkfmca1r" path="res://sprites/car.png" id="2_48rvw"]
|
|
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bj1hp"]
|
|
radius = 8.0
|
|
height = 34.0
|
|
|
|
[node name="Car" type="Node2D"]
|
|
script = ExtResource("1_0tin3")
|
|
|
|
[node name="Car" type="CharacterBody2D" parent="."]
|
|
script = ExtResource("1_i5tet")
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="Car"]
|
|
z_index = 10
|
|
scale = Vector2(0.5, 0.5)
|
|
texture = ExtResource("2_48rvw")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Car"]
|
|
rotation = -1.57079
|
|
shape = SubResource("CapsuleShape2D_bj1hp")
|
|
|
|
[node name="RayCast_FL" type="RayCast2D" parent="Car"]
|
|
target_position = Vector2(256, -128)
|
|
collision_mask = 2
|
|
|
|
[node name="RayCast_FR" type="RayCast2D" parent="Car"]
|
|
target_position = Vector2(256, 128)
|
|
collision_mask = 2
|
|
|
|
[node name="resetTimer" type="Timer" parent="Car"]
|
|
wait_time = 2.0
|
|
one_shot = true
|
|
|
|
[node name="RayCast_Car" type="RayCast2D" parent="Car"]
|
|
position = Vector2(-15, 0)
|
|
target_position = Vector2(31, 0)
|
|
collision_mask = 4
|
|
|
|
[connection signal="timeout" from="Car/resetTimer" to="Car" method="_on_reset_timer_timeout"]
|