Пример #1
0
 public static Animation create(
     float x1,
     float y1,
     float x2,
     float y2,
     float scale,
     IEntityModifierListener onAnimationDone) {
   return Animation.create(x1, y1, x2, y2, scale, 0f, false, false, onAnimationDone);
 }
Пример #2
0
 /**
  * Creates an animation.
  *
  * @param x1 the starting horizontal offset
  * @param y1 the starting vertical offset
  * @param x2 the ending horizontal offset
  * @param y2 the ending vertical offset
  * @param scale the image scale
  * @param rotation the rotation of the image in degrees
  * @param flipX whether the image is flipped horizontally
  * @param flipY whether the image is flipped vertically
  * @param onAnimationDone the listener to callback when animation completes
  * @return the defined animation
  */
 public static Animation create(
     float x1,
     float y1,
     float x2,
     float y2,
     float scale,
     float rotation,
     boolean flipX,
     boolean flipY,
     IEntityModifierListener onAnimationDone) {
   Animation a = new Animation(x1, y1, x2, y2);
   a.setScale(scale);
   a.setRotation(rotation);
   a.setFlippedHorizontal(flipX);
   a.setFlippedVertical(flipY);
   a.loadAnimation();
   a.attachOnFinishListener(onAnimationDone);
   return a;
 }