Exemplo n.º 1
0
 //清空素材列表
 void ResetMaterialList()
 {
     foreach (UICardHead item in m_materialList)
     {
         item.Destroy();
     }
     m_materialList.Clear();
     if (null != m_cardBeforHead)
     {
         m_cardBeforHead.Destroy();
         m_cardBeforHead = null;
     }
     if (null != m_cardAfterHead)
     {
         m_cardAfterHead.Destroy();
         m_cardAfterHead = null;
     }
     foreach (var item in m_modelDataList)
     {
         UIManager.Singleton.HideModel(item.m_obj as GameObject);
     }
     m_modelDataList.Clear();
     foreach (UISprite item in m_materialSpritList)
     {
         Transform labelTransform = item.transform.Find("MateriaLabel");
         labelTransform.gameObject.SetActive(false);
         Transform      texure    = item.transform.Find("Sprite");
         WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCardDivisionNullMaterialIcon);
         IconInfomation imageInfo = GameTable.IconInfoTableAsset.Lookup(worldInfo.IntTypeValue);
         texure.GetComponent <UITexture>().mainTexture = PoolManager.Singleton.LoadIcon <Texture>(imageInfo.dirName);
         Transform Startexure = item.transform.Find("Texture");
         Startexure.gameObject.SetActive(false);
         item.GetComponent <Parma>().m_type = 0;
     }
 }