public ScoreData(string _fileName) { if (File.Exists(_fileName)) { ScoreData s = SaveFile.Load <ScoreData>(_fileName); names = s.names; values = s.values; index = names.Count; } }
public ScoreData GetScoreData() { if (scores == null) { if (File.Exists(fileName)) { scores = SaveFile.Load <ScoreData>(fileName); } else { scores = new ScoreData(fileName); } } return(scores); }