|
||||||||||
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.Card.CardActor
public class CardActor
Constructor Summary | |
---|---|
CardActor(com.badlogic.gdx.graphics.Texture texture,
int actorX,
int actorY,
boolean empty,
int slot)
|
Method Summary | |
---|---|
void |
act(float delta)
|
void |
cardCollapse()
cardCollapse- if the card is expanded: resets the height of the card depending on whether or not the resource bar is expanded sets the expanded boolean, refreshes the action area and calls organiseDeck OR just resets the height when the resource bar changes. |
void |
cardExpand()
cardExpand- Calls Organize deck, moves the card up, updates the expanded boolean, and refreshes bounds. |
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float alpha)
|
Card |
getCard()
returns the selected card |
int |
getSlot()
Returns the slot the card is in |
com.badlogic.gdx.graphics.Texture |
getTexture()
Returns the texture of the card |
boolean |
isExpanded()
Gets if the card is expanded |
void |
refreshBounds()
|
void |
setActorY(float y)
Set the y coordinate of the card |
void |
setCard(Card card)
Sets the selected card |
void |
setEmpty(boolean b)
Sets if the slot is empty |
void |
setexpanded(boolean open)
Setter for if the card is expanded |
void |
setSlot(int slot)
Set the slot the card is in |
void |
setTexture(com.badlogic.gdx.graphics.Texture texture)
Sets the texture for the card |
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, getX, getY, 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, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CardActor(com.badlogic.gdx.graphics.Texture texture, int actorX, int actorY, boolean empty, int slot)
Method Detail |
---|
public void refreshBounds()
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float alpha)
draw
in class com.badlogic.gdx.scenes.scene2d.Actor
public void act(float delta)
act
in class com.badlogic.gdx.scenes.scene2d.Actor
public boolean isExpanded()
public void setexpanded(boolean open)
open
- public Card getCard()
public void setCard(Card card)
card
- public void setTexture(com.badlogic.gdx.graphics.Texture texture)
texture
- public com.badlogic.gdx.graphics.Texture getTexture()
public int getSlot()
public void setSlot(int slot)
slot
- public void setActorY(float y)
y
- public void setEmpty(boolean b)
b
- public void cardExpand()
public void cardCollapse()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |