Exemplo n.º 1
0
    public bool IsHas4Dianding()
    {
        for (int i = DiandingList.Count - 1; i >= 0; i--)
        {
            if (DiandingList[i] && !DiandingList[i].activeSelf)
            {
                DiandingList.Remove(DiandingList[i]);
            }
        }


        if (DiandingList.Count < 3)
        {
            return(false);
        }
        //for (int i = DiandingList.Count - 1; i >= 0; i--)
        //{
        //    if (DiandingList[i] == null) return false;
        //    if (!DiandingList[i].activeSelf)
        //    {
        //        DiandingList.Remove(DiandingList[i]);
        //        return false;
        //    }
        //}
        return(true);
    }
Exemplo n.º 2
0
 private void RemoveDieDiandingInList()
 {
     for (int i = DiandingList.Count - 1; i >= 0; i--)
     {
         if (DiandingList[i] == null || !DiandingList[i].activeSelf)
         {
             DiandingList.Remove(DiandingList[i]);
         }
     }
 }