private void ShowNodes() { foreach (var node in graph.Nodes) { GizmosExtensions.DrawPoint(node.Position3D); } }
private void ShowLinks() { foreach (var node in graph.Nodes) { foreach (var neighbour in node.Neighbours) { GizmosExtensions.DrawLine(node.Position3D, neighbour.Position3D, Color.cyan); } } }
private void OnDrawGizmosSelected() { if (SensedObjects != null) { foreach (var sensedObject in SensedObjects) { GizmosExtensions.DrawPoint(sensedObject.transform.position); } } }
private void OnDrawGizmosSelected() { if (debugStateTag != null) { GizmosExtensions.DrawText(Position, debugStateTag); } if (nodes != null) { GizmosExtensions.DrawPath(nodes); } }
private void ShowRegions() { var y = Mathf.Max(terrain.GrassBlockHeight, terrain.SandBlockHeight, terrain.WaterBlockHeight); foreach (var region in graph.Regions) { var topLeft2D = region.TopLeft; var topRight2D = region.TopRight; var bottomLeft2D = region.BottomLeft; var bottomRight2D = region.BottomRight; var topLeft3D = new Vector3(topLeft2D.x, y, topLeft2D.y); var topRight3D = new Vector3(topRight2D.x, y, topRight2D.y); var bottomLeft3D = new Vector3(bottomLeft2D.x, y, bottomLeft2D.y); var bottomRight3D = new Vector3(bottomRight2D.x, y, bottomRight2D.y); GizmosExtensions.DrawLine(topLeft3D, topRight3D, Color.cyan); GizmosExtensions.DrawLine(bottomLeft3D, bottomRight3D, Color.cyan); GizmosExtensions.DrawLine(topLeft3D, bottomLeft3D, Color.cyan); GizmosExtensions.DrawLine(topRight3D, bottomRight3D, Color.cyan); } }