Пример #1
0
    public void InitOrUpdateUnitList()
    {
        InitProduce();
        Barrack barrack = m_building as Barrack;
        Dictionary <int, Camp> produceTroops = barrack.GetProduceTroopDic();
        //AW.GetSingleton<IDataAdapter>().GetBuildingConfItem(barrack).GetCampVolume();
        List <int> produceUnitLists = AW.GetSingleton <IDataAdapter>().GetProduceUnitList(m_building.GetBuildingType());

        unitList.InitOrUpdateUnitList(produceUnitLists, m_building, unitListItemAnchor);
        if (campLists != null)
        {
            campLists.Clear();
        }
        campLists.AddRange(produceTroops.Keys);
        campLists.Sort();
        itemList.Clear();
        m_campCopy.UpdateCopy(campLists.Count, UpdateCampCopy);
    }
Пример #2
0
 //! 获取是否还有空闲兵营
 public bool GetIdleCamp(Barrack barrack)
 {
     return(barrack.GetProduceTroopDic().Count < GetBuildingConfItem(barrack).GetCampVolume());
 }