Created
March 5, 2019 12:01
-
-
Save EliteIntegrity/90725a7eebcef739ccb224b4b7bdd5c6 to your computer and use it in GitHub Desktop.
Loading the high score from the device storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To remember the high score | |
private val prefs: SharedPreferences = context.getSharedPreferences( | |
"Kotlin Invaders", | |
Context.MODE_PRIVATE) | |
private var highScore = prefs.getInt("highScore", 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment