DrawRect() public static method

public static DrawRect ( Rect rect, Color col ) : void
rect Rect
col Color
return void
Esempio n. 1
0
    public static void DrawRect(Rect rect, Color col, float scale)
    {
        Vector3 pos        = new Vector3((rect.x + rect.width / 2) * scale, (rect.y + rect.height / 2) * scale, 0.0f);
        Vector3 dimensions = new Vector3(rect.width * scale, rect.height * scale, 0.0f);

        DebugX.DrawRect(pos, col, dimensions);
    }
Esempio n. 2
0
    public static void DrawRect(Rect rect, Color col)
    {
        Vector3 pos   = new Vector3(rect.x + rect.width / 2, rect.y + rect.height / 2, 0.0f);
        Vector3 scale = new Vector3(rect.width, rect.height, 0.0f);

        DebugX.DrawRect(pos, col, scale);
    }
Esempio n. 3
0
    public void Update()
    {
        if (disable)
        {
            return;
        }

        transform.position = new Vector2(pos.x, pos.y);
        if (isHall)
        {
            DebugX.DrawRect(pos, new Color(0.5f, 1.0f, 0.3f, 0.7f));
            return;
        }

        if (!mainRoom)
        {
            DebugX.DrawRect(pos, Color.blue);
        }
        else
        {
            DebugX.DrawRect(pos, Color.red);
        }
    }