public void SavePlatoon() //реализует сохранение взвода { ReadData(); PlatoonsManager.AddPlatoon(new Platoon(NamePlatoon.text, BufferStudents)); PlatoonsManager.SavePlatoons(); PlatoonsHandler.Starter(SelectPlatoon, Table2, PlatoonNameLabel); CreatePanel.SetActive(false); }
public void SavePlatoon() //реализует сохранение взвода { ReadData(); PlatoonsManager.Platoons[PlatoonsManager.Platoons.FindIndex(x => x.NamePlatoon == SelectedPlatoon.NamePlatoon)] = new Platoon(NamePlatoon.text, BufferStudents); PlatoonsManager.SavePlatoons(); PlatoonsHandler.Starter(SelectPlatoon, Table2, PlatoonNameLabel); Invoke("UpdateHeadTable", (float)0.5); CreatePanel.SetActive(false); }
public void DeletePlatoonHandler() //реализует удаление взвода { PlatoonsManager.Platoons.RemoveAt(PlatoonsManager.Platoons.FindIndex(x => x.NamePlatoon == SelectedPlatoon.NamePlatoon)); PlatoonsHandler.SelectedPlatoon = null; SelectPlatoon.value = 0; PlatoonsManager.SavePlatoons(); PlatoonsHandler.Starter(SelectPlatoon, Table2, PlatoonNameLabel); Invoke("UpdateHeadTable", (float)0.5); OkNoPanel.SetActive(false); CreatePanel.SetActive(false); }