public void ClearAllBullseyeLinesAndCalculations(CustomDict row) { foreach (GameObject child in row.GetValues()) { if (child) { ClearLine(child, row.GetKey()); ClearCalculationsText(child, row.GetKey()); } } }
public void AddToBullseyeList(GameObject ref1, GameObject ref2) { CustomDict temp = GetBullsEyeListContains(ref1.name); if (temp != null) { if (!IsInBullseyeListOfList(temp, ref2)) { temp.AddToList(ref2); SetBullList(ref1.name, temp.GetValues()); } } else { temp = new CustomDict(); temp.SetKey(ref1); temp.AddToList(ref2); BullseyeRef.Add(temp); } // temp.SetUniqueName(air1.name + air2.name); //temp.SetDisplayName(air1.name.Substring(0, 3) + " ---- " + air2.name.Substring(0, 3)); }
public void OnClearSignClick(GameObject row) { if (row.name.Contains("bullseye")) { Debug.Log(row.name); CustomDict temp = refData.GetFromBullseyeList(row.name); Debug.Log(temp.GetKey().name); GetComponent <ReferenceCalculator>().ClearAllBullseyeLinesAndCalculations(temp); refData.RemoveFromBullseyeList(row.name); Destroy(BullsEyeParent.transform.Find(row.name).gameObject); } else { CustomDict temp = refData.GetFromBullseyeList(row.transform.parent.name); Debug.Log(row.name); Debug.Log(temp.GetKey()); GameObject aircraft = refData.PopFromBullseyeSublist(row.transform.parent.name, row.name); GetComponent <ReferenceCalculator>().ClearLine(aircraft, temp.GetKey()); GetComponent <ReferenceCalculator>().ClearCalculationsText(aircraft, temp.GetKey()); if (temp.GetValues().Count <= 0) { if (bullsEyeObject) { if (temp.GetKey().name == bullsEyeObject.name) { DeleteDangling(); } } Destroy(BullsEyeParent.transform.Find(temp.GetKey().name).gameObject); refData.RemoveFromBullseyeList(temp.GetKey().name); } } counterObj.text = refData.GetLastBullseyeListCount().ToString(); ViewBullPanel.GetComponent <PopulateAirRef>().PopulateBull(); }