Class ItemAnimation

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class ItemAnimation
    extends Animation
    implements java.lang.Cloneable
    Item animation info for moves.
    See Also:
    Serialized Form
    • Field Detail

      • srcPoint

        protected Point srcPoint
        The source point.
      • targetPoint

        protected Point targetPoint
        The target point.
      • item

        protected Item item
        The item.
    • Constructor Detail

      • ItemAnimation

        public ItemAnimation​(Item i,
                             Point srcPoint,
                             Point targetPoint,
                             int duration)
        Creates a new item move animation.
        Parameters:
        i - The item.
        srcPoint - The old point.
        targetPoint - The target point.
        duration - The duration in animation cycles.
    • Method Detail

      • getSrcPoint

        public Point getSrcPoint()
        Gets the old point.
        Returns:
        The old point.
      • getTargetPoint

        public Point getTargetPoint()
        Gets the target point.
        Returns:
        The target point.
      • setMovement

        public void setMovement​(Point srcPoint,
                                Point targetPoint)
        Sets the points of the movement.
        Parameters:
        srcPoint - The old point.
        targetPoint - The target point.
      • getItem

        public Item getItem()
        Gets the item.
        Returns:
        The moving item.