Package org.newdawn.slick

Examples of org.newdawn.slick.SpriteSheet


   * Initialise our resources for the example
   *
   * @param container The game container the game is running in
   */
  public void init(GameContainer container) throws SlickException {
    tiles = new SpriteSheet("testdata/tiles.png", 32,32);
    generateMap();
  }
View Full Code Here


    this.container = container;
   
    sheet = new PackedSpriteSheet("testdata/testpack.def", Image.FILTER_NEAREST);
    rocket = sheet.getSprite("rocket");
   
    SpriteSheet anim = sheet.getSpriteSheet("runner");
    runner = new Animation();
   
    for (int y=0;y<2;y++) {
      for (int x=0;x<6;x++) {
        runner.addFrame(anim.getSprite(x,y), 50);
      }
    }
  }
View Full Code Here

  /**
   * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
   */
  public void init(GameContainer container) throws SlickException {
    original = new BigImage("testdata/bigimage.tga", Image.FILTER_NEAREST, 256);
    bigSheet = new SpriteSheet(original, 16, 16);
  }
View Full Code Here

   * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
   */
  public void init(GameContainer container) throws SlickException {
    this.container = container;
   
    SpriteSheet sheet = new SpriteSheet("testdata/homeranim.png", 36, 65);
    animation = new Animation();
    for (int i=0;i<8;i++) {
      animation.addFrame(sheet.getSprite(i,0), 150);
    }
    limited = new Animation();
    for (int i=0;i<8;i++) {
      limited.addFrame(sheet.getSprite(i,0), 150);
    }
    limited.stopAt(7);
    manual = new Animation(false);
    for (int i=0;i<8;i++) {
      manual.addFrame(sheet.getSprite(i,0), 150);
    }
    pingPong = new Animation(sheet, 0,0,7,0,true,150,true);
    pingPong.setPingPong(true);
    container.getGraphics().setBackground(new Color(0.4f,0.6f,0.6f));
  }
View Full Code Here

    scaledSub = sub.getScaledCopy(2);
    image = image.getScaledCopy(0.3f);
    imageX = image.getFlippedCopy(true, false);
    imageY = imageX.getFlippedCopy(true, true);
   
    bigSheet = new SpriteSheet(original, 16, 16);
  }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.SpriteSheet

Copyright © 2018 www.massapicom. 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.