Game Development Reference
In-Depth Information
The following screenshot shows an example of when the feather power-up has been
picked up and has 6 seconds left:
You can see this from the little number shown next to the feather icon in the top-left
corner of the game screen.
As the final step for this chapter, both the new GUI render methods need to be added
to the renderGui() method of WorldRenderer :
private void renderGui (SpriteBatch batch) {
batch.setProjectionMatrix(cameraGUI.combined);
batch.begin();
// draw collected gold coins icon + text
// (anchored to top left edge)
renderGuiScore(batch);
// draw collected feather icon (anchored to top left edge)
renderGuiFeatherPowerup(batch);
// draw extra lives icon + text (anchored to top right edge)
renderGuiExtraLive(batch);
// draw FPS text (anchored to bottom right edge)
renderGuiFpsCounter(batch);
 
Search WWH ::




Custom Search