public class CardCover extends Actor
Constructor and Description |
---|
CardCover(GameGrid gameGrid,
Location location,
Deck deck,
double scaleFactor,
double rotationAngle)
Same as CardCover(gameGrid, location, deck, scaleFactor, rotationAngle, hide)
with show = true.
|
CardCover(GameGrid gameGrid,
Location location,
Deck deck,
double scaleFactor,
double rotationAngle,
boolean show)
Creates a transformed card cover actor from the seed actor of the
first card in the given deck and adds it at the given location to
the given game grid.
|
Modifier and Type | Method and Description |
---|---|
void |
act()
For internal use only.
|
void |
putOnTop(boolean onTop)
Sets the card cover actor above or below any other card actors and card covers.
|
void |
slideToTarget(Location targetLocation,
int slideStep,
boolean onTop,
boolean blocking)
Slides the card cover actor from the current location
to the given target location using the given step.
|
addActorCollisionListener, addBorderListener, addCollisionActor, addCollisionActors, addCollisionTile, addCollisionTiles, addMouseTouchListener, addMouseTouchListener, addTileCollisionListener, collide, collide, delay, displace, getBackground, getCollisionActors, getCollisionActorsInRange, getCollisionTiles, getCurrentImage, getDirection, getDirectionStart, getDisplacePosition, getHeight, getIdVisible, getImage, getImage, getIntDirection, getLocation, getLocationOffset, getLocationStart, getNbCycles, getNbHorzCells, getNbSprites, getNbVertCells, getNeighbours, getNeighbours, getNextMoveLocation, getPixelColor, getPixelLocation, getRotatedPosition, getRotationIndex, getScaledImage, getScaledImage, getScaledImage, getSlowDown, getWidth, getX, getXStart, getY, getYStart, hide, isActEnabled, isActorCollisionEnabled, isHorzMirror, isInGrid, isMoveValid, isNearBorder, isRemoved, isRotatable, isTileCollisionEnabled, isVertMirror, isVisible, move, move, nearBorder, removeSelf, reset, rotate, rotate, setActEnabled, setActorCollisionEnabled, setCollisionCircle, setCollisionCircle, setCollisionImage, setCollisionImage, setCollisionLine, setCollisionLine, setCollisionRectangle, setCollisionRectangle, setCollisionSpot, setCollisionSpot, setDirection, setDirection, setDisplacePosition, setHorzMirror, setLocation, setLocationOffset, setLocationOffset, setMouseTouchCircle, setMouseTouchCircle, setMouseTouchEnabled, setMouseTouchImage, setMouseTouchImage, setMouseTouchRectangle, setMouseTouchRectangle, setOnBottom, setOnTop, setPixelLocation, setSlowDown, setTileCollisionEnabled, setVertMirror, setX, setY, show, show, showNextSprite, showPreviousSprite, turn
public CardCover(GameGrid gameGrid, Location location, Deck deck, double scaleFactor, double rotationAngle)
gameGrid
- the GameGrid referencelocation
- the location where the actor is showndeck
- the deck where to take the seed actorscaleFactor
- the scale factor (1: no scaling) applied to seed actorrotationAngle
- the rotation angle (in degrees, clockwise) applied
to the seed actorpublic CardCover(GameGrid gameGrid, Location location, Deck deck, double scaleFactor, double rotationAngle, boolean show)
gameGrid
- the GameGrid referencelocation
- the location where the actor is showndeck
- the deck where to take the seed actorscaleFactor
- the scale factor (1: no scaling) applied to seed actorrotationAngle
- the rotation angle (in degrees, clockwise) applied
to the seed actorshow
- if true, the actor is shown; otherwise it is hidden (use Actor.show()
or slideToTarget() to show it)public void slideToTarget(Location targetLocation, int slideStep, boolean onTop, boolean blocking)
targetLocation
- the location where the movement endsslideStep
- the number of moving steps in one simulation cycle;
if zero, the actor jumps immediately to the target locationonTop
- if true, the actor is shown on top of any other card actors;
otherwise it is shown below other card actors and card covers.blocking
- if true, the methods blocks until the actor arrives at the
target; otherwise the method returns immediatelypublic void putOnTop(boolean onTop)
onTop
- if true, the actor is shown on top; otherwise it is
shown at bottom (the paint order is modified).