in4ray / firefly-sdk

Firefly - in4ray Gaming SDK
http://firefly.in4ray.com
Other
54 stars 11 forks source link

Restarting a View #6

Closed jmteixeira closed 11 years ago

jmteixeira commented 11 years ago

Hello, I don't know if this is the right place to ask this, so sorry if its not. Let me say that your SDK is awesome, and I'm trying to use it in a game that I'm developing. I didn't understand one thing, I have a GameView and I want to restart that view but I don't know how. For example, in my GameView if i go back to menu and then again to the GameView the game continues where it was. Can you help me?

Thanks :D

vstyran commented 11 years ago

Hi, in our games we add restarting logic in GameView addedToStage handler.

jmteixeira commented 11 years ago

Oh, ok :P But then if I want to remove the view to show another one and then go back without restarting? I have to use a Pop Up?

vstyran commented 11 years ago

You can use Pop Up or add flag "restart" into your game model, and if flag is "true" then on addedToStage restart otherwise continue.

jmteixeira commented 11 years ago

Thanks for your answer, I didn't remember that.