This commit is contained in:
Anuken
2020-03-13 22:33:37 -04:00
parent 06e94b1800
commit 808615a77c
19 changed files with 102 additions and 27 deletions

View File

@@ -104,9 +104,9 @@ public class MapIO{
@Override public void end(){}
@Override
public Tile tile(int x, int y){
tile.x = (short)x;
tile.y = (short)y;
public Tile tile(int index){
tile.x = (short)(index % map.width);
tile.y = (short)(index / map.width);
return tile;
}