Package org.newdawn.slick

Examples of org.newdawn.slick.Animation.addFrame()


  public void addAnimation(String animName, boolean loop, int row,
      int... frames) {
    Animation anim = new Animation(false);
    anim.setLooping(loop);
    for (int frame : frames) {
      anim.addFrame(sheet.getSprite(frame, row), duration);
    }
    addAnimation(animName, anim);
  }

  public Animation addAnimation(SpriteSheet sheet, String animName,
View Full Code Here


  public Animation addAnimation(SpriteSheet sheet, String animName,
      boolean loop, int row, int... frames) {
    Animation anim = new Animation(false);
    anim.setLooping(loop);
    for (int frame : frames) {
      anim.addFrame(sheet.getSprite(frame, row), duration);
    }
    addAnimation(animName, anim);
    return anim;
  }
View Full Code Here

      boolean fliphorizontal, boolean flipvertical, int row,
      int... frames) {
    Animation anim = new Animation(false);
    anim.setLooping(loop);
    for (int frame : frames) {
      anim.addFrame(
          sheet.getSprite(frame, row).getFlippedCopy(fliphorizontal,
              flipvertical), duration);
    }
    addAnimation(animName, anim);
  }
View Full Code Here

      Image img = sheet.getSubImage(frameIndex, row);

      if (flipHorizontal || flipVertical) {
        img = img.getFlippedCopy(flipHorizontal, flipVertical);
      }
      animation.addFrame(img, frameDuration);
    }
    return animation;
  }

  private void loadAngelCodeFont(Element element) throws SlickException {
View Full Code Here

                      }
                      if ("left".equals(elem.getName())) {
                        talking_left.addFrame(new Image(image.getAbsolutePath()), 180);
                      }
                      if ("right".equals(elem.getName())) {
                        talking_right.addFrame(new Image(image.getAbsolutePath()), 180);
                      }
                    } catch (SlickException e) {
                      e.printStackTrace();
                    }
                  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.