I have made game where my car eats coins in a track.I have put 10 coins in a track and after my car eat all the coins it have to say game completed.I know how to keep game completed screen but I dont know how to put after eating all the coins
Actor coin = getOneIntersectingObject(Coin.class);
if (coin != null)
{
getWorld().removeObject(coin);
if (getWorld().getObjects(Coin.class).isEmpty())
{
//end game
}
}