Package org.newdawn.slick.tiled

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


     * 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

     * 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

     * 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

     * @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

            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

    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

     * 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

    // }
    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

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

        //Generamos las animaciones que hemos definido en el Tiled Map.
        nivel.findAnimations();
        animations = nivel.getAnimations();
View Full Code Here

TOP

Related Classes of org.newdawn.slick.tiled.TiledMap

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.