Class InventoryDisplayComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.ui.UIComponent
com.csse3200.game.components.player.InventoryDisplayComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,Renderable,Comparable<Renderable>
Represents the display component for the player's inventory in the game.
This component provides UI elements to display weapons equipped by the player,
allowing players to see and change their currently equipped weapon.
-
Field Summary
Fields inherited from class com.csse3200.game.ui.UIComponent
skin, stage -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.ui.UIComponent
getLayer, getZIndexMethods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, dispose, overrideZIndex, renderMethods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.csse3200.game.rendering.Renderable
render
-
Constructor Details
-
InventoryDisplayComponent
public InventoryDisplayComponent()Initialises the inventory display. Listens for weapon changes and updates currently equipped weapon display.
-
-
Method Details
-
create
public void create()Creates UI styles and adds actors to the stage.- Overrides:
createin classUIComponent
-
draw
protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draws the component. This is handled by the stage.- Specified by:
drawin classRenderComponent- Parameters:
batch- The sprite batch used for drawing.
-