Hello, I have a question for you guys.
I'm making a small game where the world is generated and it is read and then it places block's (where needed)
Example:
If there is a 1 in my file I do this:
In my GrassBlock I have this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| public class GrassBlock{
private Image grass; private Polygon poly; private int x; private int y; public GrassBlock(int x,int y) throws SlickException{ System.out.println("Created grass block at X:" + x + "Y:" + y +"."); grass = new Image("res/grass.png"); this.x = x; this.y = y; }
public void draw(Graphics g,int x,int y){ g.drawImage(grass, x, y); } |
It print this out:
Created grass block at X:99Y:98.
but it doesn't show, Any help why?
Thanks!