Class Kroy

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

    public class Kroy
    extends com.badlogic.gdx.Game
    Main game class
    Author:
    Riju De
    • Constructor Summary

      Constructors 
      Constructor Description
      Kroy()  
    • Method Summary

      Modifier and Type Method Description
      void backToMenu()
      Return back to the menu screen
      static int CentreWidth()
      Centre of the screen width
      void create()  
      void dispose()  
      java.lang.Integer getHighScore()
      Get the current high score
      void newGame​(int truckNum)
      Call to generate a brand new GameScreen which runs a new game
      void render()  
      void setHighScore​(java.lang.Integer highScore)
      Set the high score
      • Methods inherited from class com.badlogic.gdx.Game

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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Kroy

        public Kroy()
    • Method Detail

      • create

        public void create()
      • render

        public void render()
        Specified by:
        render in interface com.badlogic.gdx.ApplicationListener
        Overrides:
        render in class com.badlogic.gdx.Game
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.ApplicationListener
        Overrides:
        dispose in class com.badlogic.gdx.Game
      • newGame

        public void newGame​(int truckNum)
        Call to generate a brand new GameScreen which runs a new game
        Parameters:
        truckNum - Selected truck
      • backToMenu

        public void backToMenu()
        Return back to the menu screen
      • CentreWidth

        public static int CentreWidth()
        Centre of the screen width
        Returns:
        centre of the screen width
      • setHighScore

        public void setHighScore​(java.lang.Integer highScore)
        Set the high score
        Parameters:
        highScore - The new high score
      • getHighScore

        public java.lang.Integer getHighScore()
        Get the current high score
        Returns:
        highScore