BBGamelib.CCNode.removeChildAndCleanup C# (CSharp) Method

removeChildAndCleanup() public method

public removeChildAndCleanup ( CCNode child, bool cleanup ) : void
child CCNode
cleanup bool
return void
		public virtual void removeChildAndCleanup(CCNode child, bool cleanup){
			if (child == null)
				return;
			NSUtils.Assert(_children.Contains(child), "This node does not contain the specified child.");
			detachChild(child, cleanup);
		}

Usage Example

 public void removeFromParentAndCleanup(bool cleanup)
 {
     if (_parent != null)
     {
         _parent.removeChildAndCleanup(this, cleanup);
     }
 }