Hi this is my first post here, and i am trying to make an object change its color when another object(The Main Actor) is close to it using get getOneObjectAtOffset. This is the code i got so far. Img1 is the Original Image and Img is the one i want it to turn into.
Actor Thing = getOneObjectAtOffset(getImage().getWidth()/2,getImage().getHeight()/2, Main.class);
if(Thing==null)
{
setImage(img1);
return false;
}else{
setImage(img);
return true;
}
Thanks!