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() {