replace(oldChild, newChild) → {any}
Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group. If Group.enableBody is set, then a physics body will be created on the object, so long as one does not already exist. If Group.inputEnableChildren is set, then an Input Handler will be created on the object, so long as one does not already exist.
Parameters
Name Type Description oldChild any The child in this group that will be replaced. newChild any