Bunch of stuff, working saves
This commit is contained in:
1 parent
758c83cfd2
commit
2bcc48139d
2 files changed
+22
-5
No files matched your search
@@ -25,8 +25,11 @@ public class UiController : MonoBehaviour
|
||||
}
|
||||
public static void SaveGame()
|
||||
{
|
||||
PlayerPrefs.SetInt("HighestScore", (int)UiController.distance);
|
||||
PlayerPrefs.Save();
|
||||
if (UiController.distance > UiController.highScore)
|
||||
{
|
||||
PlayerPrefs.SetInt("HighestScore", (int)UiController.distance);
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
Debug.Log("Game data saved!");
|
||||
}
|
||||
static void LoadGame()
|
||||
|
||||
Reference in new issue
Block a user