|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.badlogic.gdx.scenes.scene2d.Actor
com.TeamHEC.LocomotionCommotion.UI_Elements.Sprite
public class Sprite
| Field Summary | |
|---|---|
boolean |
started
|
| Constructor Summary | |
|---|---|
Sprite(float x,
float y,
com.badlogic.gdx.graphics.Texture texture)
Creates a Sprite which can be drawn to a stage |
|
| Method Summary | |
|---|---|
void |
act(float delta)
Can be overridden as an annoymous class to be used like a thread |
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float alpha)
Draws a texture at specific coordinates: |
com.badlogic.gdx.math.Vector2 |
getPosition()
get a vector for the x and y coords |
com.badlogic.gdx.graphics.Texture |
getTexture()
|
float |
getX()
Get the X coordinate for the Sprte |
float |
getY()
Get the Y coordinate for the sprite |
void |
increaseX(float amount)
Increase the x coordinate |
void |
increaseY(float amount)
Increase the y coordinate |
void |
refreshBounds()
Sets the touchable region for clicking on a Sprite to it's position |
void |
setPosition(float x,
float y)
set the position of the sprite |
void |
setTexture(com.badlogic.gdx.graphics.Texture t)
|
void |
setX(float actorX)
Set the X coordinate for the sprite |
void |
setY(float actorY)
Set the Y coordinate for the sprite |
| Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor |
|---|
addAction, addCaptureListener, addListener, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, fire, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getY, getZIndex, hasParent, hit, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean started
| Constructor Detail |
|---|
public Sprite(float x,
float y,
com.badlogic.gdx.graphics.Texture texture)
x - xPosition on screeny - yPosition on screentexture - The image texture used| Method Detail |
|---|
public com.badlogic.gdx.graphics.Texture getTexture()
public void setTexture(com.badlogic.gdx.graphics.Texture t)
t - the new texture for the spritepublic void act(float delta)
act in class com.badlogic.gdx.scenes.scene2d.Actor
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float alpha)
draw in class com.badlogic.gdx.scenes.scene2d.Actorpublic void refreshBounds()
public float getX()
getX in class com.badlogic.gdx.scenes.scene2d.Actorpublic void setX(float actorX)
setX in class com.badlogic.gdx.scenes.scene2d.ActoractorX - the x-coordinate for the sprite on the screenpublic float getY()
getY in class com.badlogic.gdx.scenes.scene2d.Actorpublic void setY(float actorY)
setY in class com.badlogic.gdx.scenes.scene2d.ActoractorY - the y-coordinate for the sprite on the screenpublic void increaseY(float amount)
amount - public void increaseX(float amount)
amount - public com.badlogic.gdx.math.Vector2 getPosition()
public void setPosition(float x,
float y)
setPosition in class com.badlogic.gdx.scenes.scene2d.Actorx - the x-coordinate for the sprite on the screeny - the y-coordinate for the sprite on the screen
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||