Exemplo n.º 1
0
        public void add_hs_list()
        {
            FileInfo[] fis = info.GetFiles();
            foreach (FileInfo fi in fis)
            {
                if (!fi.Extension.Contains("meta"))
                {
                    int    index      = fi.Name.IndexOf("_");
                    string nume       = Path.GetFileNameWithoutExtension(fi.FullName).Substring(index + 1);
                    string saveString = SaveSystem.Load(nume);

                    if (saveString != null)
                    {
                        SaveObject          saveObject = JsonUtility.FromJson <SaveObject>(saveString);
                        ScoreboardEntryData hs_test    = new ScoreboardEntryData();
                        hs_test.entryName  = nume;
                        hs_test.entryScore = saveObject.score;

                        hs_list.Add(hs_test);
                    }
                }
            }
        }
 public void Initialise(ScoreboardEntryData scoreboardEntryData)
 {
     entryNameText.text  = scoreboardEntryData.entryName;
     entryScoreText.text = scoreboardEntryData.entryScore.ToString();
 }