added collision
This commit is contained in:
@@ -9,8 +9,8 @@ import java.io.*;
|
||||
public class TileManager {
|
||||
|
||||
GamePanel panel;
|
||||
Tile[] tile;
|
||||
int[][] mapTileNum;
|
||||
public Tile[] tile;
|
||||
public int[][] mapTileNum;
|
||||
|
||||
public TileManager(GamePanel panel) {
|
||||
this.panel = panel;
|
||||
@@ -27,15 +27,18 @@ public class TileManager {
|
||||
|
||||
tile[1] = new Tile();
|
||||
tile[1].image = ImageIO.read(new FileInputStream("assets/tiles/wall.png"));
|
||||
tile[1].collision = true;
|
||||
|
||||
tile[2] = new Tile();
|
||||
tile[2].image = ImageIO.read(new FileInputStream("assets/tiles/water.png"));
|
||||
tile[2].collision = true;
|
||||
|
||||
tile[3] = new Tile();
|
||||
tile[3].image = ImageIO.read(new FileInputStream("assets/tiles/earth.png"));
|
||||
|
||||
tile[4] = new Tile();
|
||||
tile[4].image = ImageIO.read(new FileInputStream("assets/tiles/tree.png"));
|
||||
tile[4].collision = true;
|
||||
|
||||
tile[5] = new Tile();
|
||||
tile[5].image = ImageIO.read(new FileInputStream("assets/tiles/sand.png"));
|
||||
|
||||
Reference in New Issue
Block a user