I want the bad guy to fire a laser at the user controlled player's location. The bad guy is class Boss. This is the method that I have in Boss to try and fire a laser at the player.
However when I try to compile I get the error "non-static method getX() cannot be referenced from a static context. Any help would be welcome.
public void fire(){
Greenfoot.playSound("Laser.wav");
Laser laser = new Laser();
getWorld().addObject(laser, getX(), getY());
laser.turnTowards(Player.getX(), Player.getY());
}
