@Override public void update(float time) {
		if(this.components.isEmpty() || this.camera == null) return;
		try {
			this.sort();
			this.spriteBatch.setProjectionMatrix(this.camera.combined);
			this.spriteBatch.begin();
			
			// by passing the camera to the render call, the render component may
			// contain a spatial tree and can use the camera to determine what nodes
			// are visible...
			for(Renderable comp:this.components){
				comp.render(this.spriteBatch, this.camera);
			}
			
			this.spriteBatch.end();
			//System.out.println("draw calls: "+this.spriteBatch.renderCalls);
		} catch(Exception e){
			System.out.println(e.getMessage());
		}
	}