@Override
	public void render(float delta) {
		if (!initialized) {
			batch = new SpriteBatch();
			shape = new ShapeRenderer();
			init();
			initialized = true;
		}
		tick();
		if (hasChild) {
			if (child.renderBehind()) {
				render2(delta);
			}
			child.render(delta);
			if (child.disposeMe) {
				hasChild = false;
				child.dispose();
				synchronized (child) {
					child.notifyAll();
				}
				child = null;
			}
		} else {
			if (!renderBehind) {
				Gdx.gl.glClearColor(1f, 1f, 1f, 1f);
				Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
			}
			render2(delta);
			fps.log();
		}
		if (!isChild && disposeMe) {
			dispose();
		}
	}