How can you make an Actor wait 5 seconds (but in such a way that the whole game doesn't stop) and then delete itself?


1 2 3 4 5 6 | private int timer = 0 ; public void act() { if (++timer == 300 ) getWorld().removeObject( this ); } |