Jump to content

Pausing the Action


namaste
 Share

Recommended Posts

If you have a game in full motion - like in the Tanks game example at examples.phaser.io - is there an easy way to 'pause' the action to allow for something else to happen.

If there is a sprite controlled by the user and it's moving around the screen and colliding with various sprites (contained within various groups) and then it collides with a sprite within

one of the groups which triggers a function where say a quiz window pops up to ask a question is it possible to pause all the action within all the groups that are active at that time.
Almost like a grey out for some input to take place and then it all starts off again from where it left off?

Would it be that it would be a for loop that would riffle through all the sprite instances within the groups and switch off animations and movement? Then it would go back through

and active them all again. Something like maybe gotoSleep and wakeup functions?

I'm just examining Phaser in detail as I have a plan for a game and I am working out what code examples I could use to help me achieve an end result. It probably would have been

better to ask when I actually got to that position within the game!

Anyway, Hello! and hopefully I will get there.  I am sure to post more newbie sounding questions over the next 6 months!
 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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