petites corrections du soir

j'ai la flemme de tout indiquer ici
découvre avec plaisir, si le plaisir tu as.
This commit is contained in:
Thomas
2025-02-25 18:11:52 +01:00
parent dcb63f7fe0
commit 41573e0753
11 changed files with 191 additions and 18 deletions

View File

@@ -15,8 +15,8 @@ func _process(delta: float) -> void:
for n in range(nbCollisions):
var colider = $ShapeCast2D.get_collider(n) as Node2D
if colider != null and colider != get_parent():
(get_parent() as Node2D).z_index = colider.z_index+1
(get_parent() as Node2D).z_index = max(colider.z_index+1, (get_parent() as Node2D).z_index)
hasManipulatedZIndex = true
$debugLabel.text = str(get_parent()) + " " + str((get_parent() as Node2D).z_index)
if !hasManipulatedZIndex:
(get_parent() as Node2D).z_index = 100
$debugLabel.text = str(get_parent()) + " " + str((get_parent() as Node2D).z_index)