I've got a subclass which I want to change image depending on a variable from its Class. It's to change the image of a throttle indicator but it isn't changing. I inspected the currentSpeed variable from the subclass where it is 0 and the class which it is written in where it changes as expected.
An help will be greatly appreciated.
public void imageState()
{
if (currentSpeed == 0)
{
this.setImage("Idle throttle.png");
}
if (currentSpeed == 2)
{
this.setImage("Low throttle.png");
}
if (currentSpeed == 4)
{
this.setImage("Mid throttle.png");
}
if (currentSpeed == 6)
{
this.setImage("Full throttle.png");
}
}

