playerpref steps
This commit is contained in:
parent
c2ed30d441
commit
eb914d25de
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ public class GetGoals : MonoBehaviour {
|
||||||
userSteps = steps;
|
userSteps = steps;
|
||||||
stepText.text = steps.ToString ();
|
stepText.text = steps.ToString ();
|
||||||
userDistance = (distance * 3.28084);
|
userDistance = (distance * 3.28084);
|
||||||
PlayerPrefs.setInt("currentSteps",userSteps);
|
PlayerPrefs.SetInt("currentSteps",userSteps);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDisable () {
|
private void OnDisable () {
|
||||||
|
@ -45,7 +45,7 @@ public class GetGoals : MonoBehaviour {
|
||||||
// Create a new pedometer
|
// Create a new pedometer
|
||||||
pedometer = new Pedometer(OnStep);
|
pedometer = new Pedometer(OnStep);
|
||||||
// Reset UI
|
// Reset UI
|
||||||
OnStep(PlayerPrefs.getInt("currentSteps"), 0);
|
OnStep(PlayerPrefs.GetInt("currentSteps"), 0);
|
||||||
|
|
||||||
//goalText.text = prefKey;
|
//goalText.text = prefKey;
|
||||||
goalText.color = new Color(0f, 0f, 0f);
|
goalText.color = new Color(0f, 0f, 0f);
|
||||||
|
|
Reference in a new issue