playerpref steps
This commit is contained in:
parent
0fa4abc797
commit
5f518d4010
1 changed files with 3 additions and 1 deletions
|
@ -32,7 +32,8 @@ public class GetGoals : MonoBehaviour {
|
|||
void OnStep (int steps, double distance) {
|
||||
stepText.text = steps.ToString ();
|
||||
userDistance = (distance * 3.28084);
|
||||
PlayerPrefs.SetInt("currentSteps",userSteps + savedSteps);
|
||||
userSteps = steps + savedSteps;
|
||||
PlayerPrefs.SetInt("currentSteps",userSteps);
|
||||
}
|
||||
|
||||
private void OnDisable () {
|
||||
|
@ -51,6 +52,7 @@ public class GetGoals : MonoBehaviour {
|
|||
// Reset UI
|
||||
|
||||
OnStep(savedSteps, 0);
|
||||
Debug.Log(savedSteps);
|
||||
|
||||
|
||||
//goalText.text = prefKey;
|
||||
|
|
Reference in a new issue