Added check to hide robots not in the current layer
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Godot;
|
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()
|
public void Move()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user