Des feux rouges!
Pour arrêter les voiture vroom vroom
This commit is contained in:
@@ -12,4 +12,5 @@ func _process(delta: float) -> void:
|
||||
progress += car.speed * delta
|
||||
if progress_ratio > 1:
|
||||
progress_ratio = progress_ratio - 1
|
||||
car.moveTo(position);
|
||||
if progress_ratio > 0:
|
||||
car.moveTo(position);
|
||||
|
||||
76
scenes/sta6114.tmp
Normal file
76
scenes/sta6114.tmp
Normal file
@@ -0,0 +1,76 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://b4ydi1vv8dvwr"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d1oqt6sbjvopi" path="res://maps/world.tscn" id="1_6vs81"]
|
||||
[ext_resource type="PackedScene" uid="uid://vclpg4e4ql54" path="res://caracters/player/player.tscn" id="2_5x6b5"]
|
||||
[ext_resource type="PackedScene" uid="uid://cl201baro5y5" path="res://vehicules/npc_car.tscn" id="3_yuakw"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt1p311rn1h6q" path="res://vehicules/car.tscn" id="4_bqm78"]
|
||||
[ext_resource type="PackedScene" uid="uid://drwmmg2b6nlih" path="res://urban_furnitures/facing_south/high_road_sign.tscn" id="5_3rm0b"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6nlrmhu8362v" path="res://urban_furnitures/facing_south/high_semaphore.tscn" id="6_xgcq1"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmunphhwcsl3a" path="res://urban_furnitures/facing_north/high_semaphore.tscn" id="7_5gfx2"]
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_shblg"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, -285, 193, -110.06, 94.1858, 110.06, -94.1858, 52, 134, -159.798, 75.137, 159.798, -75.137, 204, 13, -116.409, -28.5732, 116.409, 28.5732, 2206, -11, -93.6567, -28.0441, 93.6567, 28.0441, 2387, 165, -119.584, 76.7244, 119.584, -76.7244, 2750, 126, 108.472, 48.6803, -108.472, -48.6803, 2737, -309, 122.23, -57.1464, -122.23, 57.1464, 2340, -323, 76.1953, -36.5102, -76.1953, 36.5102, 2167, -129, 107.414, 77.2535, -107.414, -77.2535, 158, -148, 57.4153, 72.8272, -57.4153, -72.8272, 39, -293, 113.137, -95.6951, -113.137, 95.6951, -405, -291, -94.7149, -70.9039, 94.7149, 70.9039, -413, 128, 0, 0, 0, 0, -286, 193, 0, 0, 0, 0, -285, 193)
|
||||
}
|
||||
point_count = 15
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_nircx"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 803, 1569, 0, 0, 0, 0, 910, 1573, 0, 0, 0, 0, 913, 1368, 0, 0, 0, 0, 1926, 1371, 0, 0, 0, 0, 1931, 342, 0, 0, 0, 0, 2082, 333, 0, 0, 0, 0, 2060, -140, 0, 0, 0, 0, 1718, -143, 0, 0, 0, 0, 1649, 73, 0, 0, 0, 0, 899, 51, 0, 0, 0, 0, 904, -1165, 0, 0, 0, 0, -890, -1162, 0, 0, 0, 0, -886, -119, 0, 0, 0, 0, -1062, -106, 0, 0, 0, 0, -1076, 268, 0, 0, 0, 0, -630, 271, 0, 0, 0, 0, -616, 161, 0, 0, 0, 0, 858, 167, 0, 0, 0, 0, 806, 1560)
|
||||
}
|
||||
point_count = 19
|
||||
|
||||
[node name="scene1" type="Node2D"]
|
||||
|
||||
[node name="monde" parent="." instance=ExtResource("1_6vs81")]
|
||||
|
||||
[node name="movibles" type="Node2D" parent="."]
|
||||
|
||||
[node name="player" parent="movibles" instance=ExtResource("2_5x6b5")]
|
||||
position = Vector2(87, 74)
|
||||
|
||||
[node name="cars" type="Node" parent="movibles"]
|
||||
|
||||
[node name="Path2D" type="Path2D" parent="movibles/cars"]
|
||||
position = Vector2(-664, 181)
|
||||
curve = SubResource("Curve2D_shblg")
|
||||
|
||||
[node name="voiture_pnj" parent="movibles/cars/Path2D" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
||||
position = Vector2(-285, 193)
|
||||
car = NodePath("../Car")
|
||||
speed = 0.2
|
||||
distanceMax = 200
|
||||
|
||||
[node name="Car" parent="movibles/cars/Path2D" instance=ExtResource("4_bqm78")]
|
||||
position = Vector2(-287, 196)
|
||||
speed = 500
|
||||
|
||||
[node name="Path2D2" type="Path2D" parent="movibles/cars"]
|
||||
curve = SubResource("Curve2D_nircx")
|
||||
|
||||
[node name="voiture_pnj" parent="movibles/cars/Path2D2" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
||||
position = Vector2(803, 1569)
|
||||
car = NodePath("../Car")
|
||||
speed = 0.1
|
||||
distanceMax = 150
|
||||
|
||||
[node name="Car" parent="movibles/cars/Path2D2" instance=ExtResource("4_bqm78")]
|
||||
position = Vector2(803, 1558)
|
||||
speed = 400
|
||||
|
||||
[node name="statics" type="Node2D" parent="."]
|
||||
position = Vector2(690, -8)
|
||||
|
||||
[node name="roadSign1" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||
position = Vector2(-1538, 118)
|
||||
|
||||
[node name="roadSign2" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||
position = Vector2(9, -1201)
|
||||
|
||||
[node name="Sempahore" parent="." node_paths=PackedStringArray("dependantSemaphore") instance=ExtResource("6_xgcq1")]
|
||||
position = Vector2(160, -14)
|
||||
dependantSemaphore = NodePath("../Semaphore2")
|
||||
|
||||
[node name="Semaphore2" parent="." instance=ExtResource("7_5gfx2")]
|
||||
position = Vector2(-94, 258)
|
||||
hasOwnTimerEnabled = false
|
||||
76
scenes/sta748D.tmp
Normal file
76
scenes/sta748D.tmp
Normal file
@@ -0,0 +1,76 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://b4ydi1vv8dvwr"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d1oqt6sbjvopi" path="res://maps/world.tscn" id="1_6vs81"]
|
||||
[ext_resource type="PackedScene" uid="uid://vclpg4e4ql54" path="res://caracters/player/player.tscn" id="2_5x6b5"]
|
||||
[ext_resource type="PackedScene" uid="uid://cl201baro5y5" path="res://vehicules/npc_car.tscn" id="3_yuakw"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt1p311rn1h6q" path="res://vehicules/car.tscn" id="4_bqm78"]
|
||||
[ext_resource type="PackedScene" uid="uid://drwmmg2b6nlih" path="res://urban_furnitures/facing_south/high_road_sign.tscn" id="5_3rm0b"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6nlrmhu8362v" path="res://urban_furnitures/facing_south/high_semaphore.tscn" id="6_xgcq1"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmunphhwcsl3a" path="res://urban_furnitures/facing_north/high_semaphore.tscn" id="7_5gfx2"]
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_shblg"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, -285, 193, -110.06, 94.1858, 110.06, -94.1858, 52, 134, -159.798, 75.137, 159.798, -75.137, 204, 13, -116.409, -28.5732, 116.409, 28.5732, 2206, -11, -93.6567, -28.0441, 93.6567, 28.0441, 2387, 165, -119.584, 76.7244, 119.584, -76.7244, 2750, 126, 108.472, 48.6803, -108.472, -48.6803, 2737, -309, 122.23, -57.1464, -122.23, 57.1464, 2340, -323, 76.1953, -36.5102, -76.1953, 36.5102, 2167, -129, 107.414, 77.2535, -107.414, -77.2535, 158, -148, 57.4153, 72.8272, -57.4153, -72.8272, 39, -293, 113.137, -95.6951, -113.137, 95.6951, -405, -291, -94.7149, -70.9039, 94.7149, 70.9039, -413, 128, 0, 0, 0, 0, -286, 193, 0, 0, 0, 0, -285, 193)
|
||||
}
|
||||
point_count = 15
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_nircx"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 803, 1569, 0, 0, 0, 0, 910, 1573, 0, 0, 0, 0, 913, 1368, 0, 0, 0, 0, 1926, 1371, 0, 0, 0, 0, 1931, 342, 0, 0, 0, 0, 2082, 333, 0, 0, 0, 0, 2060, -140, 0, 0, 0, 0, 1718, -143, 0, 0, 0, 0, 1649, 73, 0, 0, 0, 0, 899, 51, 0, 0, 0, 0, 904, -1165, 0, 0, 0, 0, -890, -1162, 0, 0, 0, 0, -886, -119, 0, 0, 0, 0, -1062, -106, 0, 0, 0, 0, -1076, 268, 0, 0, 0, 0, -630, 271, 0, 0, 0, 0, -616, 161, 0, 0, 0, 0, 858, 167, 0, 0, 0, 0, 806, 1560)
|
||||
}
|
||||
point_count = 19
|
||||
|
||||
[node name="scene1" type="Node2D"]
|
||||
|
||||
[node name="monde" parent="." instance=ExtResource("1_6vs81")]
|
||||
|
||||
[node name="movibles" type="Node2D" parent="."]
|
||||
|
||||
[node name="player" parent="movibles" instance=ExtResource("2_5x6b5")]
|
||||
position = Vector2(87, 74)
|
||||
|
||||
[node name="cars" type="Node" parent="movibles"]
|
||||
|
||||
[node name="Path2D" type="Path2D" parent="movibles/cars"]
|
||||
position = Vector2(-664, 181)
|
||||
curve = SubResource("Curve2D_shblg")
|
||||
|
||||
[node name="voiture_pnj" parent="movibles/cars/Path2D" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
||||
position = Vector2(-285, 193)
|
||||
car = NodePath("../Car")
|
||||
speed = 0.2
|
||||
distanceMax = 200
|
||||
|
||||
[node name="Car" parent="movibles/cars/Path2D" instance=ExtResource("4_bqm78")]
|
||||
position = Vector2(-287, 196)
|
||||
speed = 500
|
||||
|
||||
[node name="Path2D2" type="Path2D" parent="movibles/cars"]
|
||||
curve = SubResource("Curve2D_nircx")
|
||||
|
||||
[node name="voiture_pnj" parent="movibles/cars/Path2D2" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
||||
position = Vector2(803, 1569)
|
||||
car = NodePath("../Car")
|
||||
speed = 0.1
|
||||
distanceMax = 150
|
||||
|
||||
[node name="Car" parent="movibles/cars/Path2D2" instance=ExtResource("4_bqm78")]
|
||||
position = Vector2(803, 1558)
|
||||
speed = 400
|
||||
|
||||
[node name="statics" type="Node2D" parent="."]
|
||||
position = Vector2(690, -8)
|
||||
|
||||
[node name="roadSign1" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||
position = Vector2(-1538, 118)
|
||||
|
||||
[node name="roadSign2" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||
position = Vector2(9, -1201)
|
||||
|
||||
[node name="Sempahore" parent="." node_paths=PackedStringArray("dependantSemaphore") instance=ExtResource("6_xgcq1")]
|
||||
position = Vector2(160, -14)
|
||||
dependantSemaphore = NodePath("../Semaphore2")
|
||||
|
||||
[node name="Semaphore2" parent="." instance=ExtResource("7_5gfx2")]
|
||||
position = Vector2(-94, 258)
|
||||
hasOwnTimerEnabled = false
|
||||
@@ -1,22 +1,28 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b4ydi1vv8dvwr"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://b4ydi1vv8dvwr"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d1oqt6sbjvopi" path="res://maps/world.tscn" id="1_6vs81"]
|
||||
[ext_resource type="PackedScene" uid="uid://vclpg4e4ql54" path="res://caracters/player/player.tscn" id="2_5x6b5"]
|
||||
[ext_resource type="PackedScene" uid="uid://cl201baro5y5" path="res://vehicules/npc_car.tscn" id="3_yuakw"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt1p311rn1h6q" path="res://vehicules/car.tscn" id="4_bqm78"]
|
||||
[ext_resource type="PackedScene" uid="uid://drwmmg2b6nlih" path="res://urban_furnitures/high_road_sign.tscn" id="5_3rm0b"]
|
||||
[ext_resource type="PackedScene" uid="uid://drwmmg2b6nlih" path="res://urban_furnitures/facing_south/high_road_sign.tscn" id="5_3rm0b"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6nlrmhu8362v" path="res://urban_furnitures/facing_south/high_semaphore.tscn" id="6_xgcq1"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmunphhwcsl3a" path="res://urban_furnitures/facing_north/high_semaphore.tscn" id="7_5gfx2"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpyadhlqawviq" path="res://vehicules/brakeZone.tscn" id="8_q1enh"]
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_shblg"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, -285, 193, -110.06, 94.1858, 110.06, -94.1858, 52, 134, -159.798, 75.137, 159.798, -75.137, 204, 13, -116.409, -28.5732, 116.409, 28.5732, 2206, -11, -93.6567, -28.0441, 93.6567, 28.0441, 2387, 165, -119.584, 76.7244, 119.584, -76.7244, 2750, 126, 108.472, 48.6803, -108.472, -48.6803, 2737, -309, 122.23, -57.1464, -122.23, 57.1464, 2340, -323, 76.1953, -36.5102, -76.1953, 36.5102, 2167, -129, 107.414, 77.2535, -107.414, -77.2535, 158, -148, 57.4153, 72.8272, -57.4153, -72.8272, 39, -293, 113.137, -95.6951, -113.137, 95.6951, -405, -291, -94.7149, -70.9039, 94.7149, 70.9039, -413, 128, 0, 0, 0, 0, -286, 193, 0, 0, 0, 0, -285, 193)
|
||||
"points": PackedVector2Array(0, 0, 0, 0, -285, 193, -72.1029, 112.165, 72.1029, -112.165, 62, 108, -92.8736, 1.22052, 92.8736, -1.22052, 220, -16, -72.4586, -10.5935, 72.4586, 10.5935, 2206, -11, -122.624, -4.07119, 122.624, 4.07119, 2387, 165, -98.6077, 103.694, 98.6077, -103.694, 2759, 110, 117.462, 37.6927, -117.462, -37.6927, 2715, -276, 114.239, -35.1712, -114.239, 35.1712, 2384, -293, 50.2246, -13.5362, -50.2246, 13.5362, 2209, -126, 61.4659, 8.33138, -61.4659, -8.33138, 133, -135, 40.4345, 62.8385, -40.4345, -62.8385, 40, -272, 50.2081, -75.7177, -50.2081, 75.7177, -399, -242, -67.7454, -78.8949, 67.7454, 78.8949, -399, 107, 0, 0, 0, 0, -286, 193, 0, 0, 0, 0, -285, 193)
|
||||
}
|
||||
point_count = 15
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_nircx"]
|
||||
_data = {
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 803, 1569, 0, 0, 0, 0, 910, 1573, 0, 0, 0, 0, 913, 1368, 0, 0, 0, 0, 1926, 1371, 0, 0, 0, 0, 1931, 342, 0, 0, 0, 0, 2082, 333, 0, 0, 0, 0, 2060, -140, 0, 0, 0, 0, 1718, -143, 0, 0, 0, 0, 1649, 73, 0, 0, 0, 0, 899, 51, 0, 0, 0, 0, 904, -1165, 0, 0, 0, 0, -890, -1162, 0, 0, 0, 0, -886, -119, 0, 0, 0, 0, -1062, -106, 0, 0, 0, 0, -1076, 268, 0, 0, 0, 0, -630, 271, 0, 0, 0, 0, -616, 161, 0, 0, 0, 0, 858, 167, 0, 0, 0, 0, 806, 1560)
|
||||
"points": PackedVector2Array(0, 0, 0, 0, 803, 1569, 0, 0, 0, 0, 910, 1573, 0, 0, 0, 0, 913, 1368, 0, 0, 0, 0, 1926, 1371, 0, 0, 0, 0, 1931, 342, 0, 0, 0, 0, 2082, 333, 0, 0, 0, 0, 2060, -140, 0, 0, 0, 0, 1718, -143, 0, 0, 0, 0, 1649, 73, 0, 0, 0, 0, 912.469, 60.5339, 0, 0, 0, 0, 848, 58, 0, 0, 0, 0, 873, -21, 0, 0, 0, 0, 904, -1165, 0, 0, 0, 0, -890, -1162, 0, 0, 0, 0, -886, -119, 0, 0, 0, 0, -1062, -106, 0, 0, 0, 0, -1076, 268, 0, 0, 0, 0, -630, 271, 0, 0, 0, 0, -616, 161, 0, 0, 0, 0, 858, 167, 0, 0, 0, 0, 806, 238, 0, 0, 0, 0, 806, 1560)
|
||||
}
|
||||
point_count = 19
|
||||
point_count = 22
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tmewa"]
|
||||
size = Vector2(79, 94)
|
||||
|
||||
[node name="scene1" type="Node2D"]
|
||||
|
||||
@@ -60,7 +66,25 @@ speed = 400
|
||||
position = Vector2(690, -8)
|
||||
|
||||
[node name="roadSign1" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||
position = Vector2(5, 2)
|
||||
position = Vector2(-1538, 118)
|
||||
|
||||
[node name="roadSign2" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||
position = Vector2(-1158, 4)
|
||||
position = Vector2(9, -1201)
|
||||
|
||||
[node name="Sempahore" parent="." node_paths=PackedStringArray("dependantSemaphore") instance=ExtResource("6_xgcq1")]
|
||||
position = Vector2(160, -14)
|
||||
dependantSemaphore = NodePath("../Semaphore2")
|
||||
|
||||
[node name="Semaphore2" parent="." instance=ExtResource("7_5gfx2")]
|
||||
position = Vector2(-94, 258)
|
||||
hasOwnTimerEnabled = false
|
||||
|
||||
[node name="brakeZones" type="Node2D" parent="."]
|
||||
|
||||
[node name="Area2D" parent="brakeZones" instance=ExtResource("8_q1enh")]
|
||||
position = Vector2(1016, 59)
|
||||
fullStop = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="brakeZones/Area2D"]
|
||||
position = Vector2(-9.5, 6)
|
||||
shape = SubResource("RectangleShape2D_tmewa")
|
||||
|
||||
Reference in New Issue
Block a user