Ejemplo n.º 1
0
    private void OnDrawGizmos()
    {
        Vector3 _POS = transform.position;

        if (Factory.INSTANCE == null)
        {
            Factory.INSTANCE = FindObjectOfType <Factory>();
        }

        float cellSize = Factory.INSTANCE.storageCellSize;

        Gizmos.color = colour;
        width        = ((linesX * lineLength) + ((linesX - 1) * gutterX)) * cellSize;
        depth        = ((linesZ * lines_groupBy_Z) + ((linesZ - 1) * gutterZ)) * cellSize;
        GizmoHelpers.DrawRect(colour, _POS, width, depth, Log());

        Vector3 _START = _POS + new Vector3(0f, 0f, (depth) * factor);

        GizmoHelpers.DrawLine(Color.white, _START, _START + new Vector3(width, 0f, 0f));

        // flash on action?
        if (taskStep == 0)
        {
        }

        if (GIZMOS_DRAW_CELLS)
        {
            clusterCapacity = lineLength * lines_groupBy_Y * lines_groupBy_Z;
            capacity        = clusterCapacity * (linesX * linesY * linesZ);
        }
    }
Ejemplo n.º 2
0
 void Gizmos_DrawCell(Vector3 _cell_POS, Vector3 _cell_SIZE)
 {
     Gizmos.DrawCube(_cell_POS + _cell_SIZE * 0.5f, _cell_SIZE);
     Gizmos.DrawWireCube(_cell_POS, _cell_SIZE);
     GizmoHelpers.DrawRect(colour, _cell_POS, _cell_SIZE.x, _cell_SIZE.y);
 }