Package com.csse3200.game.rendering
Class TiledWallComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.rendering.TiledWallComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,Renderable,Comparable<Renderable>
A render component for dynamically tiling a wall texture vertically.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTiledWallComponent(com.badlogic.gdx.graphics.g2d.TextureRegion topTile, com.badlogic.gdx.graphics.g2d.TextureRegion middleTile) Creates a new TiledWallComponent. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddraw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw the renderable.Methods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, create, dispose, getLayer, getZIndex, render, setLayerMethods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
TiledWallComponent
public TiledWallComponent(com.badlogic.gdx.graphics.g2d.TextureRegion topTile, com.badlogic.gdx.graphics.g2d.TextureRegion middleTile) Creates a new TiledWallComponent.- Parameters:
topTile- The texture for the top of the wall.middleTile- The texture for repeating middle sections of the wall.
-
-
Method Details
-
draw
protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Description copied from class:RenderComponentDraw the renderable. Should be called only by the renderer, not manually.- Specified by:
drawin classRenderComponent- Parameters:
batch- Batch to render to.
-