Examples of TiledMap


Examples of org.newdawn.slick.tiled.TiledMap

  public void init(GameContainer container) throws SlickException {
    // load the sprites and tiles, note that underneath the texture
    // will be shared between the sprite sheet and tilemap
    SpriteSheet sheet = new SpriteSheet("testdata/scroller/sprites.png",32,32);
    // load the tilemap created the TileD tool
    map = new TiledMap("testdata/scroller/map.tmx");
   
    // build a collision map based on tile properties in the TileD map
    blocked = new boolean[map.getWidth()][map.getHeight()];
    for (int x=0;x<map.getWidth();x++) {
      for (int y=0;y<map.getHeight();y++) {
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

  /*
   * (non-Javadoc)
   * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
   */
  public void init(GameContainer container) throws SlickException {
    tilemap = new TiledMap("testdata/isoexample.tmx", "testdata/");
  }
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

 
  /**
   * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
   */
  public void init(GameContainer container) throws SlickException {
    map = new TiledMap("testdata/testmap.tmx","testdata");
    // read some properties from map and layer
    mapName = map.getMapProperty("name", "Unknown map name");
    monsterDifficulty = map.getLayerProperty(0, "monsters", "easy peasy");
    nonExistingMapProperty = map.getMapProperty("zaphod", "Undefined map property");
    nonExistingLayerProperty = map.getLayerProperty(1, "beeblebrox", "Undefined layer property");
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.