De la signalétique! la circulation sécurisée
Et oui, le maire de chaussette city investit Et ça se voit, bientôt les feux rouges et la circulation alternée le weekend moi je vous l'dis!
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://b4ydi1vv8dvwr"]
|
[gd_scene load_steps=8 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://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://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://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://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"]
|
||||||
|
|
||||||
[sub_resource type="Curve2D" id="Curve2D_shblg"]
|
[sub_resource type="Curve2D" id="Curve2D_shblg"]
|
||||||
_data = {
|
_data = {
|
||||||
@@ -26,36 +27,40 @@ point_count = 19
|
|||||||
[node name="player" parent="movibles" instance=ExtResource("2_5x6b5")]
|
[node name="player" parent="movibles" instance=ExtResource("2_5x6b5")]
|
||||||
position = Vector2(87, 74)
|
position = Vector2(87, 74)
|
||||||
|
|
||||||
[node name="voitures" type="Node" parent="movibles"]
|
[node name="cars" type="Node" parent="movibles"]
|
||||||
|
|
||||||
[node name="Path2D" type="Path2D" parent="movibles/voitures"]
|
[node name="Path2D" type="Path2D" parent="movibles/cars"]
|
||||||
position = Vector2(-664, 181)
|
position = Vector2(-664, 181)
|
||||||
curve = SubResource("Curve2D_shblg")
|
curve = SubResource("Curve2D_shblg")
|
||||||
|
|
||||||
[node name="voiture_pnj" parent="movibles/voitures/Path2D" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
[node name="voiture_pnj" parent="movibles/cars/Path2D" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
||||||
position = Vector2(-285, 193)
|
position = Vector2(-285, 193)
|
||||||
car = NodePath("../Car")
|
car = NodePath("../Car")
|
||||||
speed = 0.2
|
speed = 0.2
|
||||||
distanceMax = 200
|
distanceMax = 200
|
||||||
|
|
||||||
[node name="Car" parent="movibles/voitures/Path2D" instance=ExtResource("4_bqm78")]
|
[node name="Car" parent="movibles/cars/Path2D" instance=ExtResource("4_bqm78")]
|
||||||
position = Vector2(-287, 196)
|
position = Vector2(-287, 196)
|
||||||
speed = 500
|
speed = 500
|
||||||
|
|
||||||
[node name="Path2D2" type="Path2D" parent="movibles/voitures"]
|
[node name="Path2D2" type="Path2D" parent="movibles/cars"]
|
||||||
curve = SubResource("Curve2D_nircx")
|
curve = SubResource("Curve2D_nircx")
|
||||||
|
|
||||||
[node name="voiture_pnj" parent="movibles/voitures/Path2D2" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
[node name="voiture_pnj" parent="movibles/cars/Path2D2" node_paths=PackedStringArray("car") instance=ExtResource("3_yuakw")]
|
||||||
position = Vector2(803, 1569)
|
position = Vector2(803, 1569)
|
||||||
car = NodePath("../Car")
|
car = NodePath("../Car")
|
||||||
speed = 0.1
|
speed = 0.1
|
||||||
distanceMax = 150
|
distanceMax = 150
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="movibles/voitures/Path2D2/voiture_pnj"]
|
[node name="Car" parent="movibles/cars/Path2D2" instance=ExtResource("4_bqm78")]
|
||||||
offset_right = 40.0
|
|
||||||
offset_bottom = 23.0
|
|
||||||
text = "LAPIN"
|
|
||||||
|
|
||||||
[node name="Car" parent="movibles/voitures/Path2D2" instance=ExtResource("4_bqm78")]
|
|
||||||
position = Vector2(803, 1558)
|
position = Vector2(803, 1558)
|
||||||
speed = 400
|
speed = 400
|
||||||
|
|
||||||
|
[node name="statics" type="Node2D" parent="."]
|
||||||
|
position = Vector2(690, -8)
|
||||||
|
|
||||||
|
[node name="roadSign1" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||||
|
position = Vector2(5, 2)
|
||||||
|
|
||||||
|
[node name="roadSign2" parent="statics" instance=ExtResource("5_3rm0b")]
|
||||||
|
position = Vector2(-1158, 4)
|
||||||
|
|||||||
38
urban_furnitures/high_road_sign.tscn
Normal file
38
urban_furnitures/high_road_sign.tscn
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
[gd_scene load_steps=5 format=4 uid="uid://drwmmg2b6nlih"]
|
||||||
|
|
||||||
|
[ext_resource type="TileSet" uid="uid://ckj00wy20rkfx" path="res://assest/tilesets/exterieur.tres" id="1_7l72r"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://brh7cqaxc13ie" path="res://zindex/ZIndexControler.tscn" id="2_7bsc6"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_4c8ro"]
|
||||||
|
radius = 15.0
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_36vt6"]
|
||||||
|
size = Vector2(20, 3)
|
||||||
|
|
||||||
|
[node name="StaticBody2D" type="StaticBody2D"]
|
||||||
|
|
||||||
|
[node name="toit" type="TileMapLayer" parent="."]
|
||||||
|
z_index = 2000
|
||||||
|
tile_map_data = PackedByteArray("AAD9//3/BAAQAH8AAAD+//z/BAARAH4AAAD+//3/BAARAH8AAAD///v/BAASAH0AAAD///z/BAASAH4AAAD///3/BAASAH8AAAAAAPv/BAATAH0AAAAAAPz/BAATAH4AAAA=")
|
||||||
|
tile_set = ExtResource("1_7l72r")
|
||||||
|
|
||||||
|
[node name="TileMapLayer2" type="TileMapLayer" parent="toit"]
|
||||||
|
z_index = 2000
|
||||||
|
tile_map_data = PackedByteArray("AAD+//3/BAAUAH0AAAD+//7/BAAUAH4AAAA=")
|
||||||
|
tile_set = ExtResource("1_7l72r")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(20, -15)
|
||||||
|
shape = SubResource("CircleShape2D_4c8ro")
|
||||||
|
|
||||||
|
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||||
|
tile_map_data = PackedByteArray("AAAAAP3/BAATAH8AAAAAAP7/BAATAIAAAAAAAP//BAATAIEAAAA=")
|
||||||
|
tile_set = ExtResource("1_7l72r")
|
||||||
|
|
||||||
|
[node name="ZIndexControler" parent="." instance=ExtResource("2_7bsc6")]
|
||||||
|
position = Vector2(-2, 6)
|
||||||
|
|
||||||
|
[node name="ShapeCast2D" type="ShapeCast2D" parent="ZIndexControler"]
|
||||||
|
position = Vector2(21, -15)
|
||||||
|
shape = SubResource("RectangleShape2D_36vt6")
|
||||||
|
target_position = Vector2(-2, -125)
|
||||||
@@ -561,6 +561,7 @@ debugLabel = NodePath("Label")
|
|||||||
texture = ExtResource("4_0kman")
|
texture = ExtResource("4_0kman")
|
||||||
hframes = 12
|
hframes = 12
|
||||||
vframes = 4
|
vframes = 4
|
||||||
|
frame = 46
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
root_node = NodePath("../..")
|
root_node = NodePath("../..")
|
||||||
@@ -586,6 +587,7 @@ shape = SubResource("CapsuleShape2D_l8rwt")
|
|||||||
position = Vector2(1, 2)
|
position = Vector2(1, 2)
|
||||||
rotation = -3.14159
|
rotation = -3.14159
|
||||||
shape = SubResource("CapsuleShape2D_l8rwt")
|
shape = SubResource("CapsuleShape2D_l8rwt")
|
||||||
|
disabled = true
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
offset_left = 72.0
|
offset_left = 72.0
|
||||||
|
|||||||
@@ -4,3 +4,8 @@
|
|||||||
|
|
||||||
[node name="ZIndexControler" type="Node2D"]
|
[node name="ZIndexControler" type="Node2D"]
|
||||||
script = ExtResource("1_fn0ft")
|
script = ExtResource("1_fn0ft")
|
||||||
|
|
||||||
|
[node name="debugLabel" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
|
offset_right = 40.0
|
||||||
|
offset_bottom = 23.0
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ func _process(delta: float) -> void:
|
|||||||
var nbCollisions = $ShapeCast2D.get_collision_count()
|
var nbCollisions = $ShapeCast2D.get_collision_count()
|
||||||
for n in range(8):
|
for n in range(8):
|
||||||
var colider = $ShapeCast2D.get_collider(n) as Node2D
|
var colider = $ShapeCast2D.get_collider(n) as Node2D
|
||||||
if colider != null:
|
if colider != null and colider != get_parent():
|
||||||
(get_parent() as Node2D).z_index = colider.z_index+1
|
(get_parent() as Node2D).z_index = colider.z_index+1
|
||||||
hasManipulatedZIndex = true
|
hasManipulatedZIndex = true
|
||||||
print((get_parent() as Node2D).z_index)
|
$debugLabel.text = str(get_parent()) + " " + str((get_parent() as Node2D).z_index)
|
||||||
if !hasManipulatedZIndex:
|
if !hasManipulatedZIndex:
|
||||||
(get_parent() as Node2D).z_index = 100
|
(get_parent() as Node2D).z_index = 100
|
||||||
|
|||||||
Reference in New Issue
Block a user