Class InventoryScreen

java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.csse3200.game.screens.InventoryScreen
All Implemented Interfaces:
com.badlogic.gdx.Screen

public class InventoryScreen extends com.badlogic.gdx.ScreenAdapter
The InventoryScreen is a game screen containing the player's inventory.

It sets up the rendering, input and services for the UI to function and manages an InventoryDisplay component that displays the actual inventory items.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new InventoryScreen and registers the services required, creates the renderer, and initialises the Inventory UI.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    render(float delta)
     
    void
    resize(int width, int height)
     

    Methods inherited from class com.badlogic.gdx.ScreenAdapter

    hide, pause, resume, show

    Methods inherited from class java.lang.Object

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

    • InventoryScreen

      public InventoryScreen(GdxGame gdxGame)
      Creates a new InventoryScreen and registers the services required, creates the renderer, and initialises the Inventory UI.
      Parameters:
      gdxGame - current game instance
  • Method Details

    • render

      public void render(float delta)
      Specified by:
      render in interface com.badlogic.gdx.Screen
      Overrides:
      render in class com.badlogic.gdx.ScreenAdapter
    • resize

      public void resize(int width, int height)
      Specified by:
      resize in interface com.badlogic.gdx.Screen
      Overrides:
      resize in class com.badlogic.gdx.ScreenAdapter
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.Screen
      Overrides:
      dispose in class com.badlogic.gdx.ScreenAdapter