Class AlphaTextureRenderComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.rendering.TextureRenderComponent
com.csse3200.game.minigames.maze.rendering.AlphaTextureRenderComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Renderable
,Comparable<Renderable>
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.rendering.TextureRenderComponent
scaleEntity
Methods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, create, dispose, getLayer, getZIndex, render
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
AlphaTextureRenderComponent
- Parameters:
texturePath
- Internal path of static texture to render. Will be scaled to the entity's scale.
-
-
Method Details
-
setAlpha
public void setAlpha(float alpha) -
getAlpha
public float getAlpha() -
draw
public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch sb) Description copied from class:RenderComponent
Draw the renderable. Should be called only by the renderer, not manually.- Overrides:
draw
in classTextureRenderComponent
- Parameters:
sb
- Batch to render to.
-