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:
@@ -4,3 +4,8 @@
|
||||
|
||||
[node name="ZIndexControler" type="Node2D"]
|
||||
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()
|
||||
for n in range(8):
|
||||
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
|
||||
hasManipulatedZIndex = true
|
||||
print((get_parent() as Node2D).z_index)
|
||||
$debugLabel.text = str(get_parent()) + " " + str((get_parent() as Node2D).z_index)
|
||||
if !hasManipulatedZIndex:
|
||||
(get_parent() as Node2D).z_index = 100
|
||||
|
||||
Reference in New Issue
Block a user