I'm trying to write a method so that if the user mouses over my Actor, it switches to picture A, and then when they move their mouse away, it switches to picture B. This is the code I have written so far:
public void act()
{
if(Greenfoot.mouseMoved(this))
{
this.setImage("Play_button_selected.png");
}
else if(...)
{
this.setImage("Play_button.png");
}
}
However, I'm not sure how to code the ... . I did also think of using the while statement, but I'm not sure which will work best. Help?!?