Fixed content visibility and changed spawn creation

This commit is contained in:
=
2026-05-01 19:27:44 +02:00
parent 8a6de193a1
commit ae7c98d482
4 changed files with 21 additions and 10 deletions
+7 -2
View File
@@ -18,12 +18,17 @@ public class MoveNode : ProgramNode
startPosition = robot.Position;
Vector3 target = pathPoints[0] - startPosition;
float distance = target.Length();
if (distance < 0.1f)
{
robot.Position = pathPoints[0];
Vector3I mapIndex = Pathfinding.GetClosestStartPoint(robot.Position);
GameData.map[mapIndex.Y].tiles[mapIndex.X, mapIndex.Z].wasVisited = true;
Tile tile = GameData.map[mapIndex.Y].tiles[mapIndex.X, mapIndex.Z];
if (!tile.wasVisited)
{
tile.wasVisited = true;
tile.ContentNode.Visible = true;
}
pathPoints.Remove(pathPoints[0]);
if (pathPoints.Count <= 0)
{