Package com.csse3200.game.rendering
Class TiledFloorComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.rendering.TiledFloorComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,Renderable,Comparable<Renderable>
A render component for dynamically tiling a floor texture with corners, edges, and middle tiles.
It handles corner tiles, edge tiles, and repeating middle tiles
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTiledFloorComponent(com.badlogic.gdx.graphics.g2d.TextureRegion topLeftCorner, com.badlogic.gdx.graphics.g2d.TextureRegion topRightCorner, com.badlogic.gdx.graphics.g2d.TextureRegion bottomLeftCorner, com.badlogic.gdx.graphics.g2d.TextureRegion bottomRightCorner, com.badlogic.gdx.graphics.g2d.TextureRegion topEdge, com.badlogic.gdx.graphics.g2d.TextureRegion bottomEdge, com.badlogic.gdx.graphics.g2d.TextureRegion leftEdge, com.badlogic.gdx.graphics.g2d.TextureRegion rightEdge, com.badlogic.gdx.graphics.g2d.TextureRegion middleTile) Creates a new TiledFloorComponent. -
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
-
TiledFloorComponent
public TiledFloorComponent(com.badlogic.gdx.graphics.g2d.TextureRegion topLeftCorner, com.badlogic.gdx.graphics.g2d.TextureRegion topRightCorner, com.badlogic.gdx.graphics.g2d.TextureRegion bottomLeftCorner, com.badlogic.gdx.graphics.g2d.TextureRegion bottomRightCorner, com.badlogic.gdx.graphics.g2d.TextureRegion topEdge, com.badlogic.gdx.graphics.g2d.TextureRegion bottomEdge, com.badlogic.gdx.graphics.g2d.TextureRegion leftEdge, com.badlogic.gdx.graphics.g2d.TextureRegion rightEdge, com.badlogic.gdx.graphics.g2d.TextureRegion middleTile) Creates a new TiledFloorComponent.
-
-
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.
-