Saving high scores in Android game - Shared Preferences

后端 未结 3 828
情歌与酒
情歌与酒 2021-01-26 03:28

Recently I am developing a simple android game. For the scoring part, I have on many websites that shared preferences are best to save the high score. Now, what if I need to sav

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-26 03:49

    A lot of ways to save your scores to the SharedPreference. All depending on your style of implementation.

    You can simply use the putStringSet(key, String[]) where as the key will be the level and the String[] the 1ste, 2nd and 3th place.

提交回复
热议问题