Package com.coffeerpg.tiles

Examples of com.coffeerpg.tiles.GrassOverlapTile


        if (terrain[x][y].getTileType() == "WATER") {
          /* left tile */
          if (x > 1 && x < WIDTH - 1 && y > 1 && y < HEIGHT - 1) {
            /* left tile */
            if (terrain[x - 1][y] != null && (terrain[x - 1][y].getTileType() == "GRASS" || terrain[x - 1][y].getTileType() == "TREE"))
              overlaps_left[x - 1][y] = new GrassOverlapTile(x * TILE_SIZE, y * TILE_SIZE, 3);
            /* right tile */
            if (terrain[x + 1][y] != null && (terrain[x + 1][y].getTileType() == "GRASS" || terrain[x + 1][y].getTileType() == "TREE"))
              overlaps_right[x - 1][y] = new GrassOverlapTile(x * TILE_SIZE, y * TILE_SIZE, 1);
            /* top tile */
            if (terrain[x][y - 1] != null && (terrain[x][y - 1].getTileType() == "GRASS" || terrain[x][y - 1].getTileType() == "TREE"))
              overlaps_top[x - 1][y] = new GrassOverlapTile(x * TILE_SIZE, y * TILE_SIZE, 0);
            /* bottom tile ( didn't do trees for obvious reasons ) */
            if (terrain[x][y + 1] != null && (terrain[x][y + 1].getTileType() == "GRASS"))
              overlaps_bottom[x - 1][y] = new GrassOverlapTile(x * TILE_SIZE, y * TILE_SIZE, 2);
          }
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.coffeerpg.tiles.GrassOverlapTile

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.