So I have an abstract class that contains this:
public abstract void render(Graphics g);
I'm calling it from another class using this:
@Override
public void render(Graphics g) {
g.drawImage(texture.getImage(), x, y, null);
System.out.println("Render called"); //This is debug
}
For some reason, it's not being called. Here are my classes:
package tile;
import java.awt.Graphics;
import java.awt.Image;
public abstract class Tile {
public int x, y;
public Image image;
public abstract void render(Graphics g);
public Tile (int x, int y) {
x = this.x;
y = this.y;
}
public void setLocationPoint(int x, int y) {
x = this.x;
y = this.y;
}
}
Here is my other class:
package tile;
import java.awt.Graphics;
import javax.swing.ImageIcon;
public class TileSmallCloud extends Tile {
public ImageIcon texture;
public int x;
public int y;
public TileSmallCloud(int x, int y, ImageIcon image) {
super(x, y);
texture = image;
}
@Override
public void render(Graphics g) {
g.drawImage(texture.getImage(), x, y, null);
System.out.println("Rendercalled");
}
}
I've been trying to find out why it's not being called all day