Class PlayScreen

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

    public class PlayScreen
    extends java.lang.Object
    implements com.badlogic.gdx.Screen
    • Constructor Summary

      Constructors 
      Constructor Description
      PlayScreen​(Auber currentGame, boolean isDemo, int gameDifficulty)
      Class constructor.
      PlayScreen​(Auber currentGame, boolean isDemo, java.lang.String path)
      Class constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debugText()
      Prints debug text, not used.
      void dispose()
      Called when the screen is closed, need to call dispose methods of classes to ensure no memory leaks.
      boolean gameOver()
      If any of the game over conditions are true, returns true.
      boolean gameWin()
      If any of the win conditions are true, returns true.
      static com.badlogic.gdx.graphics.OrthographicCamera getCamera()
      The camera used to render the game.
      int getMaxIncorrectArrests()
      Gets the max incorrect arrests.
      static int getNumberOfInfiltrators()
      Gets the number of infiltrators.
      void hide()
      Method implemented from abstract superclass.
      void pause()
      Method implemented from abstract superclass.
      void render​(float delta)
      Called every frame, call render methods in here.
      void resize​(int width, int height)
      Called upon window being resized, and at the beginning.
      void resume()
      Method implemented from abstract superclass.
      void show()
      Method implemented from abstract superclass.
      void update​(float time)
      Called every frame, call update methods in here.
      • Methods inherited from class java.lang.Object

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

      • PlayScreen

        public PlayScreen​(Auber currentGame,
                          boolean isDemo,
                          int gameDifficulty)
        Class constructor.
        Parameters:
        currentGame - The currently running instance of the game.
        isDemo - Whether the game is running in demo mode or not.
        gameDifficulty - The difficulty of the game.
      • PlayScreen

        public PlayScreen​(Auber currentGame,
                          boolean isDemo,
                          java.lang.String path)
        Class constructor.
        Parameters:
        currentGame - The currently running instance of the game.
        isDemo - Whether the game is running in demo mode or not.
        path - The file path of the game file to be loaded.
    • Method Detail

      • show

        public void show()
        Method implemented from abstract superclass.
        Specified by:
        show in interface com.badlogic.gdx.Screen
      • gameOver

        public boolean gameOver()
        If any of the game over conditions are true, returns true.
        Returns:
        Boolean if the game is over or not
      • gameWin

        public boolean gameWin()
        If any of the win conditions are true, returns true.
        Returns:
        Boolean If the game is won or not.
      • update

        public void update​(float time)
        Called every frame, call update methods in here.
        Parameters:
        time - Time between last frame and this frame.
      • render

        public void render​(float delta)
        Called every frame, call render methods in here.
        Specified by:
        render in interface com.badlogic.gdx.Screen
        Parameters:
        delta - Time between last frame and this frame.
      • resize

        public void resize​(int width,
                           int height)
        Called upon window being resized, and at the beginning.
        Specified by:
        resize in interface com.badlogic.gdx.Screen
        Parameters:
        width - Width of the window.
        height - Height of the window.
      • pause

        public void pause()
        Method implemented from abstract superclass.
        Specified by:
        pause in interface com.badlogic.gdx.Screen
      • resume

        public void resume()
        Method implemented from abstract superclass.
        Specified by:
        resume in interface com.badlogic.gdx.Screen
      • hide

        public void hide()
        Method implemented from abstract superclass.
        Specified by:
        hide in interface com.badlogic.gdx.Screen
      • dispose

        public void dispose()
        Called when the screen is closed, need to call dispose methods of classes to ensure no memory leaks.
        Specified by:
        dispose in interface com.badlogic.gdx.Screen
      • debugText

        public void debugText()
        Prints debug text, not used.
      • getMaxIncorrectArrests

        public int getMaxIncorrectArrests()
        Gets the max incorrect arrests.
        Returns:
        An int containing the max incorrect arrests.
      • getNumberOfInfiltrators

        public static int getNumberOfInfiltrators()
        Gets the number of infiltrators.
        Returns:
        An int containing the number of infiltrators.
      • getCamera

        public static com.badlogic.gdx.graphics.OrthographicCamera getCamera()
        The camera used to render the game.
        Returns:
        The camera used to render the game.