public class GameMain
extends com.badlogic.gdx.Game
Modifier and Type | Field and Description |
---|---|
CharacterCreationScreen |
creationScreen
The Creation Screen that is used to select character traits
|
(package private) com.badlogic.gdx.graphics.FPSLogger |
FPS
An FPSLogger, FPSLogger allows us to check the game FPS is good enough
|
Map |
gameMap
The game map
|
JournalScreen |
journalScreen
The Journal Screen that is used to display the Journal
|
int |
lastSecond |
static GameMain |
me
This is a static reference to itself.
|
MainMenuScreen |
menuScreen
The main menu screen that shows up when the game is first started
|
NavigationScreen |
navigationScreen
A screen to be used to display standard gameplay within the game , including the status bar.
|
java.util.List<NPC> |
NPCs
A list holding NPC objects
|
Player |
player
A player object for the player of the game
|
ScoreTracker |
scoreTracker
The score tracker.
|
int |
ticks
This controls the game ticks and calculating how many ticks per second there are
|
WonGameScreen |
wonGameScreen
The Screen that is displayed when the player wins the game
|
Constructor and Description |
---|
GameMain() |
Modifier and Type | Method and Description |
---|---|
void |
create()
This is called at start up.
|
void |
dispose()
This is to be called when you want to dispose of all data
|
void |
gameLoop()
This is the main gameLoop that only needs to be called once, it then creates a logic thread to be executed once a game tick
|
void |
generateGame(java.util.ArrayList<java.lang.String> traits,
java.lang.String playerCostume)
The generate game screen generates the game.
|
NavigationScreen |
getNavigationScreen()
This method returns the Navigation Screen that the game runs on.
|
java.util.List<NPC> |
getNPCS(Room room)
This method returns a list of the NPCs that are in the specified room
|
AbstractScreen |
getScreen()
Overrides the getScreen method to return our AbstractScreen type.
|
void |
initialiseAllPeople()
Generates all the NPC's, Players
|
private void |
initialiseClues()
This method initialises all the clues that are to be added to the games.
|
void |
render()
This defines what's rendered on the screen for each frame.
|
public static GameMain me
public java.util.List<NPC> NPCs
public Map gameMap
public Player player
public int ticks
public int lastSecond
public NavigationScreen navigationScreen
com.badlogic.gdx.graphics.FPSLogger FPS
public MainMenuScreen menuScreen
public CharacterCreationScreen creationScreen
public WonGameScreen wonGameScreen
public JournalScreen journalScreen
public ScoreTracker scoreTracker
public void generateGame(java.util.ArrayList<java.lang.String> traits, java.lang.String playerCostume)
public void create()
public void render()
render
in interface com.badlogic.gdx.ApplicationListener
render
in class com.badlogic.gdx.Game
public void dispose()
dispose
in interface com.badlogic.gdx.ApplicationListener
dispose
in class com.badlogic.gdx.Game
public AbstractScreen getScreen()
getScreen
in class com.badlogic.gdx.Game
public void gameLoop()
public NavigationScreen getNavigationScreen()
public void initialiseAllPeople()
public java.util.List<NPC> getNPCS(Room room)
room
- The room to check.private void initialiseClues()