Package com.thecherno.cherno.engine.level.tile

Examples of com.thecherno.cherno.engine.level.tile.Tile


    int y1 = (int) (y0 + screen.getHeight() / screen.getScale() / tileSize) + 2;
    // System.out.println("Boundaries: " + x0 + "->" + x1 + ", " + y0 + "->" + y1);
    for (int yy = 0; yy < height; yy++) {
      for (int xx = 0; xx < width; xx++) {
        if (xx < x0 || xx >= x1 || yy < y0 || yy >= y1) continue;
        Tile tile = getTile(xx, yy);
        if (tile == null) continue;
        int tx = -xOffset + xx * tile.getWidth();
        int ty = -yOffset + yy * tile.getHeight();
        screen.render(tx, ty, tile);
      }
    }
    super.render(screen);
  }
View Full Code Here

TOP

Related Classes of com.thecherno.cherno.engine.level.tile.Tile

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.