public void endNoChildren() { onEnd(); parent(null); valid = false; if (uniqueModel != null) uniqueModel.dispose(); scene.remove(this); for (GameObject g : touchingObjects) g.activate(); }
void removeLayer(Layer layer) { List<Scene> sceneList = this.getScenes(); for (Scene scene : sceneList) { scene.remove(layer); } if (layer instanceof TiledLayer) { TiledLayer tl = (TiledLayer) layer; this.removeTiledLayer(tl); } else if (layer instanceof Sprite) { Sprite sprite = (Sprite) layer; this.removeSprite(sprite); } }