Examples of TiledMap


Examples of com.badlogic.gdx.maps.tiled.TiledMap

        return (int) camera.viewportHeight;
    }

    @Override
    public void loadTiledMap(String fromFile) {
        TiledMap loadedMap = new TmxMapLoader().load(Detonator.INSTANCE.gameDataDir + "/maps/" + fromFile);
        map = new TiledMapGDX(loadedMap);
        map.setCamera(camera);


        maps.add(this);
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

        public static ArrayList<Object> corners = new ArrayList<Object>();
       
  public BlockMap(String ref) throws SlickException {
    entities = new ArrayList<Object>();
    tmap = new TiledMap(ref, "data");
               
    mapWidth = tmap.getWidth() * tmap.getTileWidth();
    mapHeight = tmap.getHeight() * tmap.getTileHeight();
    for (int x = 0; x < tmap.getWidth(); x++) {
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

     * Percorso della mappa, memorizza la grandezza del tileset della mappa (16x16, 32x32, ecc..)
     * @param percorso
     * @throws SlickException - se la mappa non � leggibile/non trovata
     */
  public Mappa(String percorso) throws SlickException{
    this.map = new TiledMap(percorso);
   
      // build a collision map based on tile properties in the TileD map
      blocked = getCollisionMatrix(map,"blocked","false");
     
      tileSize = map.getTileHeight();
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

     * Percorso della mappa, memorizza la grandezza del tileset della mappa (16x16, 32x32, ecc..)
     * @param percorso
     * @throws SlickException - se la mappa non � leggibile/non trovata
     */
  public Mappa(String percorso) throws SlickException{
    this.map = new TiledMap(percorso);
   
      // build a collision map based on tile properties in the TileD map
      blocked = getCollisionMatrix(map,"blocked","false");
     
      tileSize = map.getTileHeight();
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

     * Percorso della mappa, memorizza la grandezza del tileset della mappa (16x16, 32x32, ecc..)
     * @param percorso
     * @throws SlickException - se la mappa non � leggibile/non trovata
     */
  public Mappa(String percorso) throws SlickException{
    this.map = new TiledMap(percorso);
   
      // build a collision map based on tile properties in the TileD map
      blocked = getCollisionMatrix(map,"blocked","false");
     
      tileSize = map.getTileHeight();
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

     * @throws SlickException - se la mappa non � leggibile/non trovata
     */
  public Mappa(WorldEngine we, String percorso) throws SlickException{
    this.worldEngine = we;
   
    this.map = new TiledMap(percorso);
   
      // build a collision map based on tile properties in the TileD map
      blocked = getMatrix(map,"blocked","true",Helper.LAYER_GROUND);
      // carica le entit� dalla mappa
      gigi = getMatrix(map, "gigi", "true",Helper.LAYER_ACTORS);
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

            throw new IllegalArgumentException("No parameter for key " + key + " " + parameters.keySet());
        return val;
    }

    public static TiledMap getMap(String key) {
        TiledMap map = tiledMaps.get(key);
        if (map == null)
            throw new IllegalArgumentException("No tilemap for key " + key + " " + tiledMaps.keySet());
        return map;
    }
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

    checkRequiredAttributes(element, "key", "file");
    String key = element.getAttribute("key");
    String file = element.getAttribute("file");

    Log.debug(formatLoadMsg("Tiled map", key, file));
    TiledMap tiledMap = new TiledMap(baseDir + file);
    ResourceManager.addTiledMap(key, tiledMap);
  }
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

     * main.
     */
    public Pasillo(final int id, final GameContainer container) {
        super(id, container);
        //Creamos el mapa y generamos el nivel
        TiledMap tiledMap = ResourceManager.getMap("pasilloTiled");
        nivel = new Nivel(tiledMap);

        //Asignamos el tamaño al mundo
        setWidth(ANCHO_MAPA * TAMANO_CASILLA);
        setHeight(ALTO_MAPA * TAMANO_CASILLA);
 
View Full Code Here

Examples of org.newdawn.slick.tiled.TiledMap

    // }
    if (FuzzyMain.gotoLevel > 0 && levelIndex == -1) {
      levelIndex = FuzzyMain.gotoLevel;
    }

    TiledMap map = ResourceManager.getMap(LEVEL_PREFIX + levelIndex);
    Log.info("Load map" + levelIndex);
    // make the world a bit bigger than the screen to force camera scrolling
    computeWorldSize(map);
    blocked = new int[widthInTiles][heightInTiles];
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.