Exemplo n.º 1
0
    private void OnDrawGizmos()
    {
        if (Controller.debug)
        {
            Gizmos.color = Color.blue;
            Gizmos.DrawWireSphere(transform.position, neightbourRepulsionThreshold);

            GizmoExtensions.DrawArrow(transform.position, rule1(), Color.red);
            GizmoExtensions.DrawArrow(transform.position, rule2(), Color.green);
            GizmoExtensions.DrawArrow(transform.position, rule3(), Color.yellow);
        }
    }
Exemplo n.º 2
0
    private void OnDrawGizmos()
    {
        Gizmos.DrawWireCube(bounds.center, bounds.size);
        if (points != null)
        {
            foreach (var vertex in points)
            {
                Gizmos.DrawSphere(vertex, size / 50);
            }
        }
        if (regions == null)
        {
            return;
        }
        Gizmos.color = Color.red;
        foreach (var vertex in frontier)
        {
            Gizmos.DrawWireSphere(vertex, 150);
        }

        Gizmos.color = Color.white;
        foreach (var link in city.GetLinks())
        {
            GizmoExtensions.DrawArrow(link.from.position + Vector3.up * 30, link.to.position + Vector3.up * 30);
        }

        /*foreach (var block in blocks) {
         *  foreach (var link in block.links)
         *  {
         *      Gizmos.DrawLine(link.from.position + Vector3.up * 30, link.to.position + Vector3.up * 30);
         *  }
         * }*/
        /*
         * int c = 0;
         * foreach (GraphLinked.Cell cell in regions)
         * {
         *  Gizmos.color = new Color32((byte)((c*64)%255), (byte)((c/64)%255),255,255);
         *  GizmosCell(cell, Vector3.zero);
         *  //foreach (Cell block in cell.children)
         *  {
         *      //GizmosCell(block, Vector3.up * 10);
         *      foreach (GraphLinked.Cell building in cell.children)
         *      {
         *          for (int h = 1; h <= 2; ++h)
         *          {
         *              GizmosCell(building, Vector3.up * 20*h,true);
         *          }
         *      }
         *  }
         ++c;
         * }*/
    }