I've tried to work this out but can't seem to figure it out... I need some help..
How do I make an Actor disappear if it touches the bottom of the world?
Thanks!
if (getY() == getWorld().getHeight()-1) getWorld().removeObject(this); // or if (isAtEdge()) getWorld().removeObject(this);
if (isAtEdge())
{
getImage().setTransparency(0);
}
else
{
getImage().setTransparency(255);
}getImage().setTransparency(isAtEdge() ? 0 : 255);