Package com
Class Kroy
- java.lang.Object
-
- com.badlogic.gdx.Game
-
- com.Kroy
-
- All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener
public class Kroy extends com.badlogic.gdx.GameEntry point to the main game, called by DesktopLauncher.- Since:
- 23/11/2019
-
-
Field Summary
Fields Modifier and Type Field Description com.badlogic.gdx.graphics.g2d.Batchbatchcom.badlogic.gdx.graphics.g2d.BitmapFontcoolFontcom.badlogic.gdx.graphics.g2d.SpriteBatchspriteBatch
-
Constructor Summary
Constructors Constructor Description Kroy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate()Create fields that will be needed at runtime and then display the main menu screen upon game start.voiddispose()Dispose of all game elements upon game completion.intgetDifficulty()Getter for the game difficultycom.badlogic.gdx.scenes.scene2d.ui.Label.LabelStylegetFont10()SaveControlsgetSaveControls()Getter for the game screen save controlscom.badlogic.gdx.scenes.scene2d.ui.SkingetSkin()voidloadGameFromSave(int saveNumber)Load a game from a save filevoidrender()Render the main game using the Game's render function.voidsetBatch(com.badlogic.gdx.graphics.g2d.Batch batch)Set the batch that should be used to render all the textures.voidsetDifficulty(int difficulty)Setter for the game difficulty
-
-
-
Method Detail
-
create
public void create()
Create fields that will be needed at runtime and then display the main menu screen upon game start.
-
render
public void render()
Render the main game using the Game's render function.- Specified by:
renderin interfacecom.badlogic.gdx.ApplicationListener- Overrides:
renderin classcom.badlogic.gdx.Game
-
dispose
public void dispose()
Dispose of all game elements upon game completion.- Specified by:
disposein interfacecom.badlogic.gdx.ApplicationListener- Overrides:
disposein classcom.badlogic.gdx.Game
-
setBatch
public void setBatch(com.badlogic.gdx.graphics.g2d.Batch batch)
Set the batch that should be used to render all the textures.- Parameters:
batch- The batch to be used for the game.
-
getSaveControls
public SaveControls getSaveControls()
Getter for the game screen save controls- Returns:
- The save controls object
-
setDifficulty
public void setDifficulty(int difficulty)
Setter for the game difficulty- Parameters:
difficulty- The difficulty of the game
-
getDifficulty
public int getDifficulty()
Getter for the game difficulty- Returns:
- The difficulty of the game
-
getFont10
public com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle getFont10()
-
getSkin
public com.badlogic.gdx.scenes.scene2d.ui.Skin getSkin()
-
loadGameFromSave
public void loadGameFromSave(int saveNumber)
Load a game from a save file- Parameters:
saveNumber- The number of the save file to load
-
-