I'm creating a game and I would like to load levels in the game using a tile map. this is the TileMap class code:
for(int row = 0; row < mapHeight; row++){
for(int col = 0; col < mapWidth; col++){
if(tile[col][row] == "1"){
handler.addObject(new Block(col * tileSize, row * tileSize, ID.Block, ss, 1, handler));
}
if(tile[col][row] == "&"){
handler.addObject(new Player(col*tileSize, row*tileSize, ID.Player, handler, game, ss, 2));
}
}
}
With this code I just get a blank screen. How do I fix this? Is there a better way? Thanks!