Timer is not reset when scene changed!I used SceneManager

I found that when I pressed retry button (scene:changeScene("currentScene","fade"))
then my timer count did not start count from one but start count from the point that I quit from the scene.

However, I found that if I go to another scene and back to currentScene , everything is fine.

What is cause my problem?

We don't provide support for SceneManager as it is a third party class, however hopefully Danny will see this thread and be able to offer some insight. (Danny created SceneManager.)

If you continue to have issues and cannot resolve them I'd encourage you to checkout storyboard, it's available in recent daily builds.

Peach :)

Thanks for your reply, Peach.
Actually, I did not think scene manager is the main problem.
I just really want to know that if it possible to reset timer or not since I checked on api document and I cannot find timer.reset or something that is similar to. I think I may use another logic to solve the problem. But I still want to understand the api more for my future project.

One more question, storyboard means daily build summary?

Hey,

Well, you can cancel the timer using timer.cancel(timerName) then start it again the same way you originally created it. Make sense?

Storyboard is like Director or SceneManager but is make by Ansca :)

Peach

views:1425 update:2011/12/1 20:56:45
corona forums © 2003-2011