I need help making an actor spawn on the right side of my world at any y value, making them move to the left, and despawning on the left. I have code for the oil to move to the left at a constant rate and despawn when it hits the world border:
I don't know if that code is usable in any way for spawning actors on the right side of the map, but It might help with making a solution.
public class oil extends Actor
{
public void act()
{
move(4);
if (isAtEdge()) getWorld().removeObject(this);
}
}
