I am using danposts Bar class, but for some reason it says
This is my actor class:
No single variable of the method or the method itself is static, why am I getting this "error" message?
non-static method setValue(int) cannot be referenced from a static context
public void lifes()
{
checkIfTouched();
if (touchedMole == 1)
{
lifes = 2;
Bar.setValue(2); //Thats the striking line
}
if (touchedMole == 2)
{
lifes = 1;
}
if (touchedMole == 3)
{
setLocation(600 - ((SWorld)getWorld()).getScrolledX() - 560, 285 -((SWorld)getWorld()).getScrolledY()-360);
setRotation(0);
speed = 0;
boost = 0;
touchedMole = 0;
}
}
