** Solved this like 2 minutes after posting **
I feel like I'm spamming Greenfoot today :O. Guess I'm programming lots today.
I have a simple actor that lets the player change the volume, or so I think it's simple?
This is it:
For some reason it starts out at 100% volume with VolumeFull.png, but after being clicked it just stays muted. Why is this? I've tried a few things but nothing seems to affect it.
public class VolumeSelect extends Actor
{
public int volumeLevel = 100;
public void act()
{
checkClick();
}
public void checkClick()
{
if(Greenfoot.mouseClicked(this))
{
if(volumeLevel == 0)
{
setImage("VolumeHalf.png");
volumeLevel = 50;
}
if(volumeLevel == 50)
{
setImage("VolumeFull.png");
volumeLevel = 100;
}
if(volumeLevel == 100)
{
setImage("VolumeOff.png");
volumeLevel = 0;
}
}
}
}
