Package com.csse3200.game.rendering
Class DoorRenderComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.rendering.SolidColorRenderComponent
com.csse3200.game.rendering.DoorRenderComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Renderable
,Comparable<Renderable>
A render component specifically for doors that ensures they are rendered on top of floor assets.
Uses a higher rendering layer than the default layer.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.rendering.SolidColorRenderComponent
create, dispose, draw
Methods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, disableComponent, enableComponent, isDisabled, render
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
DoorRenderComponent
public DoorRenderComponent(com.badlogic.gdx.graphics.Color color)
-
-
Method Details
-
getLayer
public int getLayer()Description copied from interface:Renderable
Layer to be rendered in. Higher layers will be rendered on top of lower layers.- Specified by:
getLayer
in interfaceRenderable
- Overrides:
getLayer
in classRenderComponent
- Returns:
- layer
-
getZIndex
public float getZIndex()Description copied from interface:Renderable
Z index controls rendering order within a layer. Higher Z index is drawn on top.- Specified by:
getZIndex
in interfaceRenderable
- Overrides:
getZIndex
in classRenderComponent
- Returns:
- Z index
-