Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function saveGame()
- _disk.saveTable( _gamedata, "SaveGameData.txt", system.DocumentsDirectory)
- print (" STUFF 'SAVED' to DISK ")
- end
- local function onSystemEvent ( event )
- print ( event.name .. ", " .. event.type )
- print ("getPrevious event type: " .. tostring (previousEvent))
- print ()
- if "applicationExit" == event.type then
- saveGame()
- end
- if "applicationReset" == event.type then
- saveGame()
- end
- previousEvent = event.type
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement