Package entidades

Examples of entidades.Bloque


        for (int x = 0; x < tiledMap.getWidth(); x++) {
            for (int y = 0; y < tiledMap.getHeight(); y++) {
                for (int l = 0; l < tiledMap.getLayerCount(); l++) {
                    int tileID = tiledMap.getTileId(x, y, 0);
                    if (tileID == 1) {
                        result.add(new Bloque(x, y, Bloque.PARED, true));
                    }
                    if (tileID == 2) {
                        result.add(new Puerta(x, y, Bloque.PUERTA, true));
                    }
                    if (tiledMap.getLayerProperty(l, "underPlayer", "-1").equals("1") && tiledMap.getTileImage(x, y, l) != null) {
                        result.add(new Bloque(x, y, Bloque.CAPA1, false, tiledMap.getTileImage(x, y, l)));
                    }
                    if (tiledMap.getLayerProperty(l, "underPlayer", "-1").equals("0") && tiledMap.getTileImage(x, y, l) != null) {
                        result.add(new Bloque(x, y, Bloque.CAPA2, false, tiledMap.getTileImage(x, y, l)));
                    }
                }
            }
        }
        return result;
View Full Code Here

TOP

Related Classes of entidades.Bloque

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.