Tile code cleanup

This commit is contained in:
Anuken
2020-03-03 19:29:41 -05:00
parent bac1648d4b
commit 087f8129b9
10 changed files with 75 additions and 103 deletions

View File

@@ -254,12 +254,9 @@ public class MapEditorDialog extends Dialog implements Disposable{
)));
world.endMapLoad();
//add entities so they update. is this really needed?
for(int x = 0; x < world.width(); x++){
for(int y = 0; y < world.height(); y++){
Tile tile = world.rawTile(x, y);
if(tile.entity != null){
tile.entity.add();
}
for(Tile tile : world.tiles){
if(tile.entity != null){
tile.entity.add();
}
}
player.set(world.width() * tilesize/2f, world.height() * tilesize/2f);