Package com

Class Kroy

  • All Implemented Interfaces:
    com.badlogic.gdx.ApplicationListener

    public class Kroy
    extends com.badlogic.gdx.Game
    Entry 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.Batch batch  
      com.badlogic.gdx.graphics.g2d.BitmapFont coolFont  
      com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch  
      • Fields inherited from class com.badlogic.gdx.Game

        screen
    • Constructor Summary

      Constructors 
      Constructor Description
      Kroy()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create()
      Create fields that will be needed at runtime and then display the main menu screen upon game start.
      void dispose()
      Dispose of all game elements upon game completion.
      int getDifficulty()
      Getter for the game difficulty
      com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle getFont10()  
      SaveControls getSaveControls()
      Getter for the game screen save controls
      com.badlogic.gdx.scenes.scene2d.ui.Skin getSkin()  
      void loadGameFromSave​(int saveNumber)
      Load a game from a save file
      void render()
      Render the main game using the Game's render function.
      void setBatch​(com.badlogic.gdx.graphics.g2d.Batch batch)
      Set the batch that should be used to render all the textures.
      void setDifficulty​(int difficulty)
      Setter for the game difficulty
      • Methods inherited from class com.badlogic.gdx.Game

        getScreen, pause, resize, resume, setScreen
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • batch

        public com.badlogic.gdx.graphics.g2d.Batch batch
      • spriteBatch

        public com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch
      • coolFont

        public com.badlogic.gdx.graphics.g2d.BitmapFont coolFont
    • Constructor Detail

      • Kroy

        public Kroy()
    • 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:
        render in interface com.badlogic.gdx.ApplicationListener
        Overrides:
        render in class com.badlogic.gdx.Game
      • dispose

        public void dispose()
        Dispose of all game elements upon game completion.
        Specified by:
        dispose in interface com.badlogic.gdx.ApplicationListener
        Overrides:
        dispose in class com.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