|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.jcardgame.TargetArea
public class TargetArea
Class to represent the target area and moving options for card transfers.
Constructor Summary | |
---|---|
TargetArea(Location targetLocation)
Sets the attributes for transferring cards. |
|
TargetArea(Location targetLocation,
CardOrientation cardOrientation,
int slideStep,
boolean onTop)
Sets the attributes for transferring cards. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 actorsMethod Detail |
---|
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |