StaticScreen - UQcsse3200/2024-studio-1 GitHub Wiki

StaticScreen.java is a new abstract screen that can be extended to implement the basic screens in the game. It removes the need for duplicate code that was previously duplicated across screens.

StaticScreen can be extended for screens that fit these requirements:

  • Use actors (basic UI elements)
  • Have assets that need to be loaded in
  • Don't have more complex functionality e.g. animations, game worlds (for example, the MainGameScreen hasn't been tested as an extension of StaticScreen and still uses the original ScreenAdapter).

StaticScreen will handle the following for you:

  • Logging
  • Adding the UI to the EntityService
  • Registering services in the ServiceLocator
  • Setting a background colour
  • Loading/unloading textures
  • Disposing