From 75818c22d57bf8cca28123dde17651ec8c000b50 Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 1 May 2026 18:40:07 +0200 Subject: [PATCH] Added check to hide robots not in the current layer --- Scripts/Robot/Robot.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Scripts/Robot/Robot.cs b/Scripts/Robot/Robot.cs index cd40eba..de2a8bf 100644 --- a/Scripts/Robot/Robot.cs +++ b/Scripts/Robot/Robot.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Threading.Tasks; using Godot; @@ -27,6 +28,8 @@ public partial class Robot : Node3D } } + Visible = Math.Round(Math.Abs(Position.Y / GameData.tileHeight), 0) == GameData.visibleLayer; + } public void Move() {