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

            return(scores);
        }