FContainer.RemoveAllChildren C# (CSharp) Метод

RemoveAllChildren() публичный Метод

public RemoveAllChildren ( ) : void
Результат void
    public void RemoveAllChildren()
    {
        int childCount = _childNodes.Count;

        for(int c = 0; c<childCount; c++)
        {
            FNode node = _childNodes[c];

            node.HandleRemovedFromContainer();

            if(_isOnStage)
            {
                node.HandleRemovedFromStage();
                node.stage = null;
            }
        }

        _childNodes.Clear();
    }

Usage Example

Пример #1
0
    public void clearMe()
    {
        background.RemoveAllChildren();
        foreground.RemoveAllChildren();
        midground.RemoveAllChildren();

        enemies.Clear();
        humans.Clear();

        foreach (FSprite tentacle in tentaclePieces)
        {
            tentacle.RemoveFromContainer();
        }
        tentaclePieces.Clear();

        foreach (FSprite debug in debugRects.Values)
        {
            debug.RemoveFromContainer();
        }
        debugRects.Clear();
    }
All Usage Examples Of FContainer::RemoveAllChildren