Fixed Formatting

Removed unused variables
Added Save() to OnDestroy() within all scripts related to PlayerData
This commit is contained in:
2017-09-03 19:47:23 -04:00
parent a339149a71
commit 90948610cd
5 changed files with 173 additions and 108 deletions

View File

@@ -20,17 +20,17 @@ public class GameManager : MonoBehaviour {
public float increment;
}
// Update is called once per frame
void Update () {
}
// Use this for initialization
void Start () {
Load();
}
// Update is called once per frame
void Update () {
}
void OnEnable()
{
Load();
@@ -67,7 +67,6 @@ public class GameManager : MonoBehaviour {
bf.Serialize(file, data);
file.Close();
Debug.Log("Saved");
}
public void Load()
@@ -85,11 +84,6 @@ public class GameManager : MonoBehaviour {
GameObject.FindGameObjectWithTag("ExpGained").GetComponent<ExperienceBar>().currentExp = data.experience;
GameObject.FindGameObjectWithTag("ExpGained").GetComponent<ExperienceBar>().currentRequirement = data.requirement;
Debug.Log("Loaded");
}
}
}