Implementing the camera and displaying a map in the render loop
The next class to review is MainGameScreen
, which can be found at core/src/com/packtpub/libgdx/bludbourne/screens/MainGameScreen.java
. The MainGameScreen
class is the first Screen
implementation for our game and represents the main gameplay screen used to display the game map, player avatar, and any UI components.
MainGameScreen
The class diagram for MainGameScreen
(Figure 8) shows all the attributes and method signatures for our first pass:
The import packages for MainGameScreen
are as follows:
package com.packtpub.libgdx.bludbourne.screens; import com.badlogic.gdx.Gdx; import ...
Get Mastering LibGDX Game Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.