Skip to content

Screens

Paulius Imbrasas edited this page Jan 16, 2014 · 8 revisions

The game utilises a simple screen system. See Screen.java for the abstract class.

How to use

Every new Screen must extend the Screen abstract class and must implement render() (drawing logic should be here) and update() (updating coordinates, other stuff should be done here).

One can use the built-in functions:

  • draw() passing the TextureRegion and draw an object without creating any additional classes.
    • I recommend setting up a Stage and just using Stage::getSpriteBatch() for the SpriteBatch argument
  • drawString() same as above, just for drawing strings. Uses the font specified in the Art class

Screens available

Clone this wiki locally