From 37a6524ae2c1f908ec487d219916487a9b4a364b Mon Sep 17 00:00:00 2001 From: asleal2 Date: Thu, 26 Apr 2018 02:35:06 -0500 Subject: [PATCH] playerpref steps --- MoCha/Assets/Scripts/GetGoals.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MoCha/Assets/Scripts/GetGoals.cs b/MoCha/Assets/Scripts/GetGoals.cs index 089fe19..306811e 100644 --- a/MoCha/Assets/Scripts/GetGoals.cs +++ b/MoCha/Assets/Scripts/GetGoals.cs @@ -30,10 +30,10 @@ public class GetGoals : MonoBehaviour { private int savedSteps = 0; void OnStep (int steps, double distance) { - stepText.text = steps.ToString (); userDistance = (distance * 3.28084); userSteps = steps + savedSteps; PlayerPrefs.SetInt("currentSteps",userSteps); + stepText.text = userSteps.ToString (); } private void OnDisable () {