Bandidos
|
Public Member Functions | |
RenderInfo (Texture texture) | |
RenderInfo (Texture texture, FrameInfo[] frames) | |
FrameInfo [] | getAllFrameInfos () |
int | getFramesLength () |
Texture | getTextureToDraw () |
int | getStartX (int frameInfoIndex) |
int | getStartY (int frameInfoIndex) |
int | getCutWidth (int frameInfoIndex) |
int | getCutHeight (int frameInfoIndex) |
Vector2 | getInnerOffset () |
void | setInnerOffset (float xOffset, float yOffset) |
void | clean () |
This is a class holding a texture to display and what part of the texture to display
com.mygdx.game.engine.entities.components.rendering.RenderInfo.RenderInfo | ( | Texture | texture | ) |
Shows the entire picture given
texture | to display |
com.mygdx.game.engine.entities.components.rendering.RenderInfo.RenderInfo | ( | Texture | texture, |
FrameInfo [] | frames | ||
) |
Shows a part of the texture given. All other info is given in pixels.
texture | to show partly |
cutPosX | is where the cutting should start in the x axis |
cutPosY | is where the cutting should start in the y axis |
frameSizeX | is how much it should cut starting from the cutPosX |
frameSizeY | is how much it should cut starting from the cutPosY |
void com.mygdx.game.engine.entities.components.rendering.RenderInfo.clean | ( | ) |
Cleans the data in the RenderInfo Class.
FrameInfo [] com.mygdx.game.engine.entities.components.rendering.RenderInfo.getAllFrameInfos | ( | ) |
Returns all the FrameInfos linked in the RenderInfo
int com.mygdx.game.engine.entities.components.rendering.RenderInfo.getCutHeight | ( | int | frameInfoIndex | ) |
Returns the height it should cut from the start position.
int com.mygdx.game.engine.entities.components.rendering.RenderInfo.getCutWidth | ( | int | frameInfoIndex | ) |
Returns the width it should cut from the start position.
int com.mygdx.game.engine.entities.components.rendering.RenderInfo.getFramesLength | ( | ) |
Returns the amount of frame info classes this render info contains.
Vector2 com.mygdx.game.engine.entities.components.rendering.RenderInfo.getInnerOffset | ( | ) |
Affects the rendering. Default (0,0) keeps the RenderInfo at normal space. 1 draws it its mass to one side, and -1 to the opposite.
int com.mygdx.game.engine.entities.components.rendering.RenderInfo.getStartX | ( | int | frameInfoIndex | ) |
Returns the X axis start cutting coordinates for the texture.
int com.mygdx.game.engine.entities.components.rendering.RenderInfo.getStartY | ( | int | frameInfoIndex | ) |
Returns the Y axis start cutting coordinates for the texture.
Texture com.mygdx.game.engine.entities.components.rendering.RenderInfo.getTextureToDraw | ( | ) |
Returns the full texture to draw
void com.mygdx.game.engine.entities.components.rendering.RenderInfo.setInnerOffset | ( | float | xOffset, |
float | yOffset | ||
) |
Sets the inner offset of this RenderInfo If its 0,0. Its unaffected. If the x is set to 0.5. The texture will be drawn half his width offset to the right. etc
xOffset | normalized value of how much to put offset in the x axis using the value of the texture width |
yOffset | normalized value of how much to put offset in the y axis using the value of the texture height |