Example #1
0
 /// <summary>
 /// 更新数据。
 /// </summary>
 public void UpdataData(LAMapData pMapData)
 {
     if (m_lMapItems.Count == 0)
     {
         for (int i = 0; i < pMapData.m_lRooms.Count; i++)
         {
             MapItem Item = new MapItem(m_pPrefab);
             Item.FillData(pMapData.m_lRooms[i]);
             Item.OnClickMapItemRoomAction = OnClickRoomItem;
             m_lMapItems.Add(Item);
         }
     }
     else
     {
         for (int i = 0; i < pMapData.m_lRooms.Count; i++)
         {
             m_lMapItems[i].FillData(pMapData.m_lRooms[i]);
         }
     }
 }