Package com.csse3200.game.components
Class ActionIndicatorComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.rendering.TextureRenderComponent
com.csse3200.game.components.ActionIndicatorComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,Renderable,Comparable<Renderable>
A UI component that displays a tutorial image and corresponding key as text.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.rendering.TextureRenderComponent
getRotation, getTexture, scaleEntity, setOrigin, setRotation, setTextureMethods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, getLayer, getZIndex, render, setLayerMethods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ActionIndicatorComponent
- Parameters:
imagePath- Path to the texture for the action's image.keyText- The text for the action being performed (used to get the keymap)
-
-
Method Details
-
create
public void create()Description copied from class:ComponentCalled when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.- Overrides:
createin classRenderComponent
-
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.- Overrides:
drawin classTextureRenderComponent- Parameters:
batch- Batch to render to.
-
dispose
public void dispose()Description copied from class:ComponentCalled when the component is disposed. Dispose of any internal resources here.- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classRenderComponent
-