Class ItemAnimation

  • All Implemented Interfaces:, 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.
        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.
        The old point.
      • getTargetPoint

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

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

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