Exemplo n.º 1
0
 void RefreshDeleteSaves()
 {
     Delete.DeactivateAll();
     foreach (var saveFile in SaveFiles.GetSaves())
     {
         var obj = Delete.GetPooledObject();
         obj.GetComponentInChildren <Text>().text = saveFile.FileNameWithoutExt;
         var btn = obj.GetComponentInChildren <Button>();
         btn.onClick.RemoveAllListeners();
         btn.onClick.AddListener(() => {
             SaveFiles.DeleteSave(saveFile);
             Refresh();
         });
         obj.SetActive(true);
     }
 }
Exemplo n.º 2
0
 void DeleteSave(SaveFile save)
 {
     SaveFiles.DeleteSave(save);
     RefreshSaveFiles();
     ResetAllButtonColors();
 }