Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Groundwork for tiles and level loading
  • Loading branch information
wjg12004 committed Feb 15, 2016
1 parent dc1d92b commit 88bc588
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/level/LevelHandler.java
Expand Up @@ -2,25 +2,20 @@ package level;

public class LevelHandler {

/*
* Loads levels from a text file.
*/

private byte[] tiles;
private Integer[] tiles;
private int width;
private int height;

private String levelPath;

public LevelHandler(String levelPath){
public LevelHandler(String levelPath) {
if (levelPath != null) {
this.levelPath = levelPath;
this.loadLevelFromFile();
}
}



private void loadLevelFromFile() {

}
}
33 changes: 33 additions & 0 deletions src/level/tiles/Tile.java
@@ -0,0 +1,33 @@
package level.tiles;

public abstract class Tile {

protected int id;
protected boolean isFloor;
protected boolean isWall;
private int color;

public Tile(int id, boolean isFloor, boolean isWall, int color) {
this.id = id;
this.isFloor = isFloor;
this.isWall = isWall;
this.color = color;
}

public int getId() {
return id;
}

public boolean isFloor() {
return isFloor;
}

public boolean isWall() {
return isWall;
}

public abstract void tick();

//Not sure what needs to be passed in here just yet, will become apparent when the rendering is closer to being done.
public abstract void render();
}

0 comments on commit 88bc588

Please sign in to comment.