Jump to content

adding coins to game


daniel0514
 Share

Recommended Posts

hi, i have this design where i want to add some coins to the game in some specific positions (see image)

 

post-14040-0-02850100-1430234440.png

 

what is the best way to do that?

 

I tried creating a group but it just shows once and when i grab the coins i don't know how to create more of them

 

I'd really appreciate any help with that!

 

thanks in advance

 

Link to comment
Share on other sites

When you "grab" the coins do you remove them from the game? You can have a group with several sprites and call .kill() on them when you "grab" them.

 

Then call 

var coin = group.getFirstDead();coin.revive();

This is basic recycling so you don't need to create more just re-enable the initial ones.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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