示例#1
0
    private void RemoveSubExtrusion(SubExtrusion subExtrusion, bool updateBounds = true)
    {
        var typeIndex = (int)subExtrusion.type;

        if (typedSubExtrusions[typeIndex] != null)
        {
            typedSubExtrusions[typeIndex].Remove(subExtrusion);
        }

        if (updateBounds)
        {
            UpdateBounds();
        }
    }
示例#2
0
    private void AddSubExtrusion(SubExtrusion subExtrusion, bool updateBounds = true)
    {
        var typeIndex = (int)subExtrusion.type;

        if (typedSubExtrusions[typeIndex] == null)
        {
            typedSubExtrusions[typeIndex] = new List <SubExtrusion>();
        }

        typedSubExtrusions[typeIndex].Add(subExtrusion);

        if (updateBounds)
        {
            UpdateBounds();
        }
    }