Пример #1
0
 /// <summary>
 /// 重置物品显示价格数据
 /// </summary>
 internal void SetDataSourceReset()
 {
     WarGoodsStoreMobaGoodsDataSource.ForEach((item) =>
     {
         item.ResetItemValue();
     });
 }
Пример #2
0
 /// <summary>
 /// 玩家金钱显示改变的时候执行,判断物品能否购买
 /// </summary>
 /// <param name="_nMoney"></param>
 internal void onMoneyChange(int _nMoney)
 {
     WarGoodsStoreMobaGoodsDataSource.ForEach((item) =>
     {
         item.GoodsCanBuy = item.GoodsCost <= _nMoney ? true : false;
     });
 }
Пример #3
0
        /// <summary>
        /// 有物品购买时更新数据
        /// </summary>
        internal void onPurchasedChange()
        {
            List <int> purchasedGoodsID = GetPurchasedGoodsIDList();

            if (purchasedGoodsID != null)
            {
                WarGoodsStoreMobaGoodsDataSource.ForEach((item) =>
                {
                    item.IsPurchased = purchasedGoodsID.Contains(item.GoodsID);
                });
            }
        }