How to start and endGame after 60 second

0 votes

Hi,

I am using appwarp s2 to build a simple game: 2 users join room and then game start, after 60s i want to stop game and send score to client and then send notification to users that game will be restart on next 10s, and so on..

Can you quick prototype some method order in BaseRoomAdaptor class?

  • How can we check for 60s after game start
  • How can we idle for 10s and then start game again 
  • Where should we put that logic? (is this on onTimerTick function ?)

Thank so much!

asked Oct 19, 2014 in AppWarpS2 by tappygame (30 points)

1 Answer

0 votes
 
Best answer
Hi,

You can use onTimerTick method. You can define the time interval in AppConfig.json. For example you can set 1 sec as time interval and then when you start the game, start counting ticks. After 60 ticks i.e. 60 sec, stop the game. Similarly you can wait for 10 seconds.

Thanks
answered Oct 20, 2014 by Suyash Mohan (900 points)
selected Oct 21, 2014 by tappygame
Hi!
Thank so much for your answer!
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...