Example #1
0
 void ClearFloatingIcon()
 {
     for (int i = 0; i < floatingIconTrans.childCount; i++)
     {
         GameObject iconGo    = floatingIconTrans.GetChild(0).gameObject;
         IPoolUnit  iPoolUnit = iconGo.GetComponent <IPoolUnit>();
         iPoolUnit.Restore();
     }
 }
Example #2
0
 void HideHud()
 {
     foreach (HudInfo info in hudInfoList)
     {
         if (info.hudGo != null)
         {
             IPoolUnit unit = info.hudGo.GetComponent <IPoolUnit>();
             unit.Restore();
             info.hudGo = null;
         }
     }
 }
Example #3
0
 public void RemoveHud(HudType type)
 {
     for (int i = hudInfoList.Count - 1; i >= 0; i--)
     {
         HudInfo info = hudInfoList[i];
         if (info.type == type)
         {
             if (info.hudGo != null)
             {
                 IPoolUnit unit = info.hudGo.GetComponent <IPoolUnit>();
                 unit.Restore();
                 info.hudGo = null;
             }
             hudInfoList.RemoveAt(i);
         }
     }
 }