Basically I want to take a time stamp. Close the game. Then when the game next opens I want to check if so much time has elapsed.
Any ideas how I can do this?
ok, partially solved. I found the rex_date plugin that allows me to do date.UnixTimestamp. So I just need to subtract one from the other to get a difference in seconds.
So now I need to work out how to tell if the player has minimized the game on a mobile platform so I know when to call it.
I was wondering if there was an on resume event which is tied to pausing on unfocus?
From the manual, for the browser Object:
Triggered when the page's visibility changes, or when a mobile app is going in to the background or foreground. When invisible or in the background the app is suspended: all events stop running and all audio is muted."
Develop games in your browser. Powerful, performant & highly capable.
Cheers, I had just found it, but thanks for the confirmation