예제 #1
0
    private void DrawCity()
    {
        Rect cityRect = new Rect(new Vector2(position.width / 2 + (menuSize - 30) / 2, position.height / 2 - 20), new Vector2(30, 30));

        EditorGUI.DrawRect(cityRect, new Color(0f, 0.5f, 0f, 0.3f));

        foreach (BuildingNode b in city.getCityMap())
        {
            Debug.Log(cityRect.position.x + b.getLocation().x + "\t" + cityRect.position.y + b.getLocation().y);
            EditorGUI.DrawRect(new Rect(new Vector2(cityRect.position.x + b.getLocation().x, cityRect.position.y + b.getLocation().y),
                                        new Vector2(15, 15)), new Color(0.5f, 0.5f, 0f, 0.3f));
        }
    }