BBGamelib.CCNode.detachChild C# (CSharp) Method

detachChild() static private method

static private detachChild ( CCNode child, bool cleanup ) : void
child CCNode
cleanup bool
return void
		void detachChild(CCNode child, bool cleanup)
		{
			// IMPORTANT:
			//  -1st do onExit
			//  -2nd cleanup
			if (_isRunning)
			{
				child.onExitTransitionDidStart();
				child.onExit();
			}
			
			child.parent = null;
			_children.Remove(child);
			
			
			// If you don't do cleanup, the child's actions will not get removed and the
			// its scheduledSelectors_ dict will not get released!
			if (cleanup)
				child.cleanup ();
			else
				child.gameObject.SetActive(false);
		}
		// helper used by reorderChild & add