示例#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);
        }