I am using the Director class in my game and want to save the game state when the app is supended by hooking into the following
local onSystemEvent = function( event )
if "applicationSuspend" == event.type then
All my game code is held in a file called Screen2.lua whereas this onSystemEvent code is in my main.lua
Hence my question is how do I go about saving all the local variables inside Screen2.lua to enable me to resume the game?
Sorry probably a basic question but I am still haven’t quite got my head round communication between modules and want to implement as efficient a solution as possible.
Perhaps someone has an example of saving and resuming game state using the Director class?
Any advice much appreciated.
Thanks
Paul [import]uid: 7863 topic_id: 5113 reply_id: 305113[/import]