Esempio n. 1
0
 public void ClearAllBullseyeLinesAndCalculations(CustomDict row)
 {
     foreach (GameObject child in row.GetValues())
     {
         if (child)
         {
             ClearLine(child, row.GetKey());
             ClearCalculationsText(child, row.GetKey());
         }
     }
 }
Esempio n. 2
0
 private GameObject IsInBullseyeListOfList(CustomDict temp, GameObject ref2)
 {
     foreach (CustomDict child in BullseyeRef)
     {
         if (child.GetKey().name == temp.GetKey().name)
         {
             foreach (GameObject subchild in child.GetValues())
             {
                 if (subchild.name == ref2.name)
                 {
                     return(subchild);
                 }
             }
         }
     }
     return(null);
 }
Esempio n. 3
0
    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();
    }