Editing goals page, added monster manager to home

This commit is contained in:
Darrel Marek 2018-04-26 09:46:58 -05:00
parent 0596bac28b
commit aff276ff78
4 changed files with 5 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View file

@ -35,7 +35,7 @@ public class GetGoals : MonoBehaviour {
userDistance = (distance * 3.28084); userDistance = (distance * 3.28084);
userSteps = steps + savedSteps; userSteps = steps + savedSteps;
PlayerPrefs.SetInt("currentSteps",userSteps); PlayerPrefs.SetInt("currentSteps",userSteps);
stepText.text = userSteps.ToString (); stepText.text = userSteps.ToString () + "/" + stepsGoal.ToString();
userPoints = steps*5 + savedPoints; userPoints = steps*5 + savedPoints;
PlayerPrefs.SetInt("totalPoints",userPoints); PlayerPrefs.SetInt("totalPoints",userPoints);
@ -57,7 +57,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
stepText.text = savedSteps.ToString (); stepText.text = savedSteps.ToString () + "/" + stepsGoal.ToString();
if(PlayerPrefs.HasKey("totalPoints")) if(PlayerPrefs.HasKey("totalPoints"))
{ {
pointsText.text = "Points: " + PlayerPrefs.GetInt("totalPoints").ToString (); pointsText.text = "Points: " + PlayerPrefs.GetInt("totalPoints").ToString ();
@ -76,8 +76,8 @@ public class GetGoals : MonoBehaviour {
//goalText.text = prefKey; //goalText.text = prefKey;
goalText.color = new Color(0f, 0f, 0f); goalText.color = new Color(0f, 0f, 0f);
Debug.Log(goalText.transform.position.x.ToString() + " " + goalText.transform.position.y.ToString());
barPos = new Vector2(goalText.transform.position.x - 105, goalText.transform.position.y - 30); barPos = new Vector2(goalText.transform.position.x, goalText.transform.position.y);
currentDayStr = System.DateTime.Now.ToString("MM/dd/yyyy"); currentDayStr = System.DateTime.Now.ToString("MM/dd/yyyy");
goalDayStr = System.DateTime.Now.ToString("MM/dd/yyyy"); goalDayStr = System.DateTime.Now.ToString("MM/dd/yyyy");
@ -150,7 +150,7 @@ public class GetGoals : MonoBehaviour {
PlayerPrefs.SetInt("currentSteps", userSteps); PlayerPrefs.SetInt("currentSteps", userSteps);
savedSteps = 0; savedSteps = 0;
//OnStep(0,0); //OnStep(0,0);
stepText.text = userSteps.ToString (); stepText.text = userSteps.ToString () + "/" + stepsGoal.ToString();
//destroy the goal and set a new one? //destroy the goal and set a new one?
savedPoints += stepsGoal*10; savedPoints += stepsGoal*10;