-
Notifications
You must be signed in to change notification settings - Fork 0
Game Screens
Anastasia Laczko edited this page May 30, 2021
·
11 revisions
The game contains several screen which which implement hte libgdx ScreenAdapter interface.
GDXGame
contains functionality for transitioning between these screens as it implements the libgdx Game interface, and these transitions can be triggered by the current screen.
Within the base game, there are 3 screens: Main Menu Screen, Main Game Screen, and Settings Screen. The starting screen is the Main Menu Screen.
Create a new class which implements ScreenAdaptor
, e.g. NewScreen.
In GDXGame
Add NEW_SCREEN
to ScreenType
and modify newScreen
.
private Screen newScreen(ScreenType screenType) {
switch (screenType) {
...
case NEW_SCREEN:
return new NewScreen(this);
...
}
}
public enum ScreenType {
MAIN_MENU, MAIN_GAME, SETTINGS, NEW_SCREEN
}
The Final Boss
Shop
Inventory
Achievements
Infrastructure
User Interfaces Across All Pages
User Interfaces Buildings
Guidebook
[Resource Management](Resource-Management)