Ejemplo n.º 1
0
        public Square(
            SquareEdgeNode topLeft,
            SquareEdgeNode topRight,
            SquareEdgeNode bottomLeft,
            SquareEdgeNode bottomRight
            )
        {
            TopLeft     = topLeft;
            TopRight    = topRight;
            BottomLeft  = bottomLeft;
            BottomRight = bottomRight;

            if (topLeft.Active)
            {
                Configuration += 8;
            }
            if (topRight.Active)
            {
                Configuration += 4;
            }
            if (bottomRight.Active)
            {
                Configuration += 2;
            }
            if (bottomLeft.Active)
            {
                Configuration += 1;
            }
        }
Ejemplo n.º 2
0
 public static void DrawSquareEadgeNode(SquareEdgeNode node, float size)
 {
     Gizmos.color = node.Active ? Color.black : Color.white;
     Gizmos.DrawCube(node.Position, Vector3.one * size);
 }