le freinage dure un certain temps et ce temps dépends du delta des frames. Sinon les voitures freinent plus ou moins vite en fonction de ce que les pc cibles sont capable d'arriver à faire tourner.
71 lines
3.1 KiB
Plaintext
71 lines
3.1 KiB
Plaintext
[gd_scene load_steps=8 format=3 uid="uid://bmunphhwcsl3a"]
|
|
|
|
[ext_resource type="Script" path="res://urban_furnitures/semaphores/semaphore.gd" id="2_nih7h"]
|
|
[ext_resource type="TileSet" uid="uid://ckj00wy20rkfx" path="res://assest/tilesets/exterieur.tres" id="3_ulyk6"]
|
|
[ext_resource type="PackedScene" uid="uid://brh7cqaxc13ie" path="res://zindex/ZIndexControler.tscn" id="4_k52t8"]
|
|
[ext_resource type="PackedScene" uid="uid://dpyadhlqawviq" path="res://vehicules/brakeZone.tscn" id="5_o0gjx"]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_4c8ro"]
|
|
radius = 15.0
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_36vt6"]
|
|
size = Vector2(20, 3)
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y0214"]
|
|
size = Vector2(200, 95.5)
|
|
|
|
[node name="Node2D" type="Node2D"]
|
|
script = ExtResource("2_nih7h")
|
|
|
|
[node name="Sempahore" type="StaticBody2D" parent="."]
|
|
|
|
[node name="abovePart" type="TileMapLayer" parent="Sempahore"]
|
|
z_index = 2000
|
|
tile_set = ExtResource("3_ulyk6")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sempahore"]
|
|
position = Vector2(20, -15)
|
|
shape = SubResource("CircleShape2D_4c8ro")
|
|
|
|
[node name="pylon" type="TileMapLayer" parent="Sempahore"]
|
|
tile_map_data = PackedByteArray(0, 0, 0, 0, 253, 255, 4, 0, 20, 0, 10, 0, 0, 0, 0, 0, 254, 255, 4, 0, 20, 0, 11, 0, 0, 0, 0, 0, 255, 255, 4, 0, 20, 0, 12, 0, 0, 0, 0, 0, 251, 255, 4, 0, 20, 0, 8, 0, 0, 0, 0, 0, 252, 255, 4, 0, 20, 0, 9, 0, 0, 0)
|
|
tile_set = ExtResource("3_ulyk6")
|
|
|
|
[node name="red" type="TileMapLayer" parent="Sempahore"]
|
|
tile_map_data = PackedByteArray(0, 0, 0, 0, 252, 255, 4, 0, 18, 0, 16, 0, 0, 0, 0, 0, 251, 255, 4, 0, 18, 0, 15, 0, 0, 0, 0, 0, 253, 255, 4, 0, 18, 0, 17, 0, 0, 0, 0, 0, 254, 255, 4, 0, 18, 0, 18, 0, 0, 0)
|
|
tile_set = ExtResource("3_ulyk6")
|
|
|
|
[node name="yellow" type="TileMapLayer" parent="Sempahore"]
|
|
tile_map_data = PackedByteArray(0, 0, 0, 0, 252, 255, 4, 0, 18, 0, 16, 0, 0, 0, 0, 0, 253, 255, 4, 0, 18, 0, 17, 0, 0, 0, 0, 0, 251, 255, 4, 0, 18, 0, 15, 0, 0, 0, 0, 0, 254, 255, 4, 0, 18, 0, 18, 0, 0, 0)
|
|
tile_set = ExtResource("3_ulyk6")
|
|
|
|
[node name="green" type="TileMapLayer" parent="Sempahore"]
|
|
tile_map_data = PackedByteArray(0, 0, 0, 0, 253, 255, 4, 0, 18, 0, 17, 0, 0, 0, 0, 0, 251, 255, 4, 0, 18, 0, 15, 0, 0, 0, 0, 0, 252, 255, 4, 0, 18, 0, 16, 0, 0, 0, 0, 0, 254, 255, 4, 0, 18, 0, 18, 0, 0, 0)
|
|
tile_set = ExtResource("3_ulyk6")
|
|
|
|
[node name="ZIndexControler" parent="Sempahore" instance=ExtResource("4_k52t8")]
|
|
position = Vector2(-2, 6)
|
|
|
|
[node name="ShapeCast2D" type="ShapeCast2D" parent="Sempahore/ZIndexControler"]
|
|
position = Vector2(21, -15)
|
|
shape = SubResource("RectangleShape2D_36vt6")
|
|
target_position = Vector2(2, -209)
|
|
|
|
[node name="Timer" type="Timer" parent="."]
|
|
wait_time = 5.0
|
|
one_shot = true
|
|
autostart = true
|
|
|
|
[node name="Label" type="Label" parent="."]
|
|
offset_right = 40.0
|
|
offset_bottom = 23.0
|
|
|
|
[node name="brakeZone" parent="." instance=ExtResource("5_o0gjx")]
|
|
|
|
[node name="CollisionShape2D2" type="CollisionShape2D" parent="brakeZone"]
|
|
position = Vector2(95, -146)
|
|
rotation = 1.5708
|
|
shape = SubResource("RectangleShape2D_y0214")
|
|
|
|
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|