working stats page

This commit is contained in:
asleal2 2018-04-26 12:34:20 -05:00
parent c8777e958a
commit 341945e946
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.Text;
public class StatsUpdate : MonoBehaviour {
public Text score;
public Text steps;
public Text distance;
// Use this for initialization
void Start () {
steps.text = PlayerPrefs.GetInt("currentSteps").ToString();
score.text = PlayerPrefs.GetInt("totalPoints").ToString();
distance.text = ((float)PlayerPrefs.GetInt("currentSteps")/2000.0f).ToString() + " mi.";
}
// Update is called once per frame
void Update () {
}
}

View file

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 7edf082a74403478192a66b0b815e18b
timeCreated: 1524763129
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: