Jump to content

Reusing groups?


ekeimaja
 Share

Recommended Posts

I now continued my td city driving game. Other cars are made with group. When they pass topline, they are killed. How I get them to appear again from bottom?

I tried to follow example, but it does not work.

    var enemycar = this.enemycars.getFirstExists(false);

    if (enemycar)
    {
        enemycar.revive();
    }
    }


 

Link to comment
Share on other sites

Hello,

did you try reset? If your sprites are above top and continue that way then even after reviving them they won't change their position unless you change it. So just give them the new position. Btw if you revive them before changing position don't forget to make sure that you don't kill them again before you move them.

Did it help?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...