swapChildren(child, child2) {
		const index = this.getChildIndex(child);
		const index2 = this.getChildIndex(child2);

		if (index !== -1 && index2 !== -1) {
			// swap z index
			const _z = child.pos.z;
			child.pos.z = child2.pos.z;
			child2.pos.z = _z;
			// swap the positions..
			this.getChildren()[index] = child2;
			this.getChildren()[index2] = child;
			// mark the container as dirty
			this.isDirty = true;
		} else {
			throw new Error(
				child +
					" Both the supplied childs must be a child of the caller " +
					this,
			);
		}
	}
Swaps the position (z-index) of 2 children
@param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be added
@param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child2 - Child to be added