Package com.starpoints.state
Class ItemMove
- java.lang.Object
-
- com.starpoints.state.ItemMove
-
- All Implemented Interfaces:
java.io.Serializable
public class ItemMove extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAnimationDuration()
int
getAnimationIndex()
Direction
getDirection()
Gets the Direction from the source to the target point.int
getLifecycleIndex()
int
getSourceX()
int
getSourceY()
int
getTargetX()
int
getTargetY()
boolean
hasMoved()
Checks, if source and target coordinates are equal
-
-
-
Method Detail
-
getSourceX
public int getSourceX()
- Returns:
- the sourceX
-
getSourceY
public int getSourceY()
- Returns:
- the sourceY
-
getTargetX
public int getTargetX()
- Returns:
- the targetX
-
getTargetY
public int getTargetY()
- Returns:
- the targetY
-
getAnimationIndex
public int getAnimationIndex()
- Returns:
- the animationIndex
-
getAnimationDuration
public int getAnimationDuration()
- Returns:
- the animationDuration
-
hasMoved
public boolean hasMoved()
Checks, if source and target coordinates are equal- Returns:
-
getDirection
public Direction getDirection()
Gets the Direction from the source to the target point. If the target is neither in the same row nor column or both points are equal, Direction.None is returned.- Returns:
- The direction from source to target.
-
getLifecycleIndex
public int getLifecycleIndex()
- Returns:
- the lifecycleIndex
-
-