Exemple #1
0
 public float maxHeight() {
   float max = -1f;
   for (SpriteImage s : spriteImages) {
     if (s.height() > max) max = s.height();
   }
   return max;
 }
Exemple #2
0
 /** Return the height of the current sprite. */
 public float height() {
   if (current != null) {
     return current.height();
   } else {
     return 1;
   }
 }
Exemple #3
0
 /** Update the Sprite layer. */
 private void updateLayer() {
   if (current != null) {
     layer.setImage(
         current
             .image()
             .subImage(
                 current.x(), current.y(),
                 current.width(), current.height()));
   }
 }