public void AddNewCustom() { OrbitalElements newOrbit = new OrbitalElements(); newOrbit.ID = 100000 + customList.Count; newOrbit.name = searchInput.text; newOrbit.a = float.Parse(customInputs[0].text); newOrbit.e = float.Parse(customInputs[1].text); newOrbit.i = float.Parse(customInputs[2].text); newOrbit.Ω = float.Parse(customInputs[3].text); newOrbit.ω = float.Parse(customInputs[4].text); newOrbit.M0 = float.Parse(customInputs[5].text); newOrbit.mdm = float.Parse(customInputs[6].text); newOrbit.H = float.Parse(customInputs[7].text); newOrbit.epoch = DateTime.Parse(customInputs[8].text); newOrbit.period = float.Parse(customValues[0].text); newOrbit.peri_dist = float.Parse(customValues[1].text); newOrbit.aphel_dist = float.Parse(customValues[2].text); newOrbit.orbitType = customValues[3].text; newOrbit.number = ""; customList.Add(newOrbit); anim.SetBool("IsCustom", false); isCustom = false; PageInit(); PageRefresh(); DataMgr.DataSave(); }
//즐겨찾기 추가 public void FavoritCheck() { if (source.Count.Equals(0)) { return; } if (!favoritList.Contains(selectEle)) { favoritList.Add(selectEle); FavoritMark.SetActive(true); } else { favoritList.Remove(selectEle); FavoritMark.SetActive(false); } PageRefresh(); DataMgr.DataSave(); }
public void listClear() { if (sourceIndex.Equals(3)) //리스트일 때 { checkList.Clear(); AstroMgr.instance.PlotAsteroid(checkList); } else if (sourceIndex.Equals(1)) //커스텀일 때 { for (int i = items.Length - 1; i >= 0; i--) { if (items[i].gameObject.activeSelf && items[i].CheckMark.activeSelf && !items[i].isAdditionBtn) { customList.Remove(items[i].elements); checkList.Remove(items[i].elements); favoritList.Remove(items[i].elements); AstroMgr.instance.RemoveAsteroid(items[i].elements); } } DataMgr.DataSave(); } PageInit(); PageRefresh(); }