removeChild method

void removeChild (
  1. Node child
)

Removes a child from this node.

removeChild(myChildNode);

Implementation

void removeChild(Node child) {
  assert(child != null);
  if (_children.remove(child)) {
    child._parent = null;
    child._spriteBox = null;
    if (_spriteBox != null) _spriteBox._deregisterNode(child);
  }
}