public class TargetArea
extends java.lang.Object
Constructor and Description |
---|
TargetArea(Location targetLocation)
Sets the attributes for transferring cards.
|
TargetArea(Location targetLocation,
CardOrientation cardOrientation,
int slideStep,
boolean onTop)
Sets the attributes for transferring cards.
|
Modifier and Type | Method and Description |
---|---|
TargetArea |
clone()
Performs a deep copy of the given TargetArea.
|
CardOrientation |
getCardOrientation()
Returns the current card orientation.
|
int |
getSlideStep()
Returns the curren slide step (steps per simulation cycle to move the card in an
animated transfer).
|
Location |
getTargetLocation()
Returns a clone of the current target location.
|
boolean |
isOnTop()
Returns the current state of set onTop flag.
|
void |
setCardOrientation(CardOrientation cardOrientation)
Sets the card orientation to the given orientation.
|
void |
setOnTop(boolean enable)
Sets/resets the onTop flag.
|
void |
setSlideStep(int slideStep)
Sets the slide step to the given step
|
void |
setTargetLocation(Location targetLocation)
Sets the target location to the given location.
|
public TargetArea(Location targetLocation)
targetLocation
- the location where the cards are transferredpublic TargetArea(Location targetLocation, CardOrientation cardOrientation, int slideStep, boolean onTop)
targetLocation
- the location where the cards are transferredcardOrientation
- the card orientation used for the transferslideStep
- the distance the card moves at every game grid simulation cycle (>= 1)onTop
- if true, the card moves over all other actors; otherwise it moves under
other actorspublic TargetArea clone()
clone
in class java.lang.Object
public Location getTargetLocation()
public CardOrientation getCardOrientation()
public int getSlideStep()
public boolean isOnTop()
public void setTargetLocation(Location targetLocation)
targetLocation
- the new target locationpublic void setCardOrientation(CardOrientation cardOrientation)
cardOrientation
- the new card orientationpublic void setSlideStep(int slideStep)
slideStep
- the new slide step (steps per simulation cycle to
move the card in an animated transfer).public void setOnTop(boolean enable)
enable
- if true, the card moves over all other actors in
an animated transfer; otherwise it moves below other actors