Class ItemMove

  • All Implemented Interfaces:
    java.io.Serializable

    public class ItemMove
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • ItemMove

        public ItemMove​(Point source,
                        Point target,
                        int animationIndex,
                        int animationDuration,
                        int lifecycleIndex)
    • 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