Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Image collisionMap(TiledMap tm) throws SlickException
- {
- Image map = new Image(tm.getWidth()*32, tm.getHeight()*32);
- int li = tm.getLayerIndex("Collision");
- org.newdawn.slick.Graphics g;
- g = map.getGraphics();
- for(int x = 0; x<tm.getWidth(); x++){
- for(int y = 0; y<tm.getHeight(); y++){
- if(tm.getTileImage(x, y, li)!=null){
- g.drawImage(tm.getTileImage(x, y, li), x*32, y*32, Color.white);
- }
- }
- }
- return(map);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement