Class GameScreen

java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.mygdx.game.UI.Page
com.mygdx.game.UI.GameScreen
All Implemented Interfaces:
com.badlogic.gdx.Screen

public class GameScreen
extends Page
  • Field Summary

    Fields inherited from class com.mygdx.game.UI.Page

    actors
  • Constructor Summary

    Constructors
    Constructor Description
    GameScreen​(PirateGame parent, int id_map)
    Boots up the actual game: starts PhysicsManager, GameManager, EntityManager, loads texture atlases into ResourceManager.
  • Method Summary

    Modifier and Type Method Description
    protected void CreateActors()
    Draw UI elements showing player health, plunder, and ammo.
    void dispose()
    disposed of all stuff it something is missing from this method you will get memory leaks
    void render​(float delta)
    Called every frame calls all other functions that need to be called every frame by rasing events and update methods
    void resize​(int width, int height)
    Resize camera, effectively setting the viewport to display game assets at pixel ratios other than 1:1.
    protected void update()
    Update the UI with new values for health, quest status, etc.

    Methods inherited from class com.mygdx.game.UI.Page

    hide, show

    Methods inherited from class com.badlogic.gdx.ScreenAdapter

    pause, resume

    Methods inherited from class java.lang.Object

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

    • GameScreen

      public GameScreen​(PirateGame parent, int id_map)
      Boots up the actual game: starts PhysicsManager, GameManager, EntityManager, loads texture atlases into ResourceManager. Draws quest and control info.
      Parameters:
      parent - PirateGame UI screen container
      id_map - the resource id of the tile map
  • Method Details

    • render

      public void render​(float delta)
      Called every frame calls all other functions that need to be called every frame by rasing events and update methods
      Specified by:
      render in interface com.badlogic.gdx.Screen
      Overrides:
      render in class Page
      Parameters:
      delta - delta time
    • dispose

      public void dispose()
      disposed of all stuff it something is missing from this method you will get memory leaks
      Specified by:
      dispose in interface com.badlogic.gdx.Screen
      Overrides:
      dispose in class com.badlogic.gdx.ScreenAdapter
    • resize

      public void resize​(int width, int height)
      Resize camera, effectively setting the viewport to display game assets at pixel ratios other than 1:1.
      Specified by:
      resize in interface com.badlogic.gdx.Screen
      Overrides:
      resize in class Page
      Parameters:
      width - of camera viewport
      height - of camera viewport
    • update

      protected void update()
      Update the UI with new values for health, quest status, etc. also called once per frame but used for actors by my own convention
      Overrides:
      update in class Page
    • CreateActors

      protected void CreateActors()
      Draw UI elements showing player health, plunder, and ammo.
      Specified by:
      CreateActors in class Page