Hello JGO,
Recently, I have been working on a game which involves moving a spite towards another sprite using a MouseListener, then hiding the first sprite. So far, I’ve tried doing this:
// mouseX and mouseY are the mouse's X and Y.
if (level.getMap(mouseX, mouseY).equals("1")) { // "1" stands for the 2nd sprite
c.goAway();
}
The getMap() method takes an x and a y value. This is what happens when I run the program.
Can anyone help me with this error?
Thanks,
DarkCart