im making a game and i want to use mouse control but when i put in the code i get an error message. heres my code for using the mouse to shot and aim.
private void fire()
{
MouseInfo m = new MouseInfo();
if (reloadDelayCount >= gunReloadTime && m.getButton() ==1)
{
Greenfoot.turnTowards(m.getX(),m.getY());
Bullet bullet = new Bullet ();
getWorld().addObject (bullet, ppl1X, ppl1Y);
bullet.move (10);
reloadDelayCount = 0;
}
the message i keep getting is Mouseinfo() is not public in Greenfooot.mouseinfo; cannot be accessed from outside package.
what does this mean and what do i do