开发者

How to save my current game into cache?

开发者 https://www.devze.com 2023-04-11 08:32 出处:网络
I\'m currently deve开发者_运维百科loping an android game using SurfaceView and i want to save my GameField class/object to the cache.

I'm currently deve开发者_运维百科loping an android game using SurfaceView and i want to save my GameField class/object to the cache.

Can you please help me.

Thanks.


this should explain it:

http://mobile.tutsplus.com/tutorials/android/android-application-preferences/


Do you mean that you want to save the game state to the device so it can be restored when the application restarts? If so, consider using SharedPreferences as outlined here: http://developer.android.com/reference/android/content/SharedPreferences.html

If SharedPreferences won't work, here is an article about all the basic persisted storage options available: http://developer.android.com/guide/topics/data/data-storage.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号