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:
new GrassBlock(x,y);
In my GrassBlock I have this:
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!