示例#1
0
文件: CBagData.cs 项目: cash2one/oold
 public void AddBagItem(CBagItem bagItem)
 {
     if (bagItem == null)
     {
         return;
     }
     m_itemList.Add(bagItem);
 }
示例#2
0
文件: CBagData.cs 项目: cash2one/oold
 public void UpdateBagItem(CItem Item)
 {
     if (!_updateItem(Item))
     {
         CBagItem newitem = new CBagItem();
         newitem.ItemData = Item;
         AddBagItem(newitem);
     }
 }
示例#3
0
文件: CBagData.cs 项目: cash2one/oold
 public bool SerializeFrom(UnityUtility.CStream msgStream)
 {
     m_bagSize      = msgStream.ReadUInt();
     m_bagItemCount = msgStream.ReadUInt();
     for (int i = 0; i < m_bagItemCount; i++)
     {
         CBagItem bagItem = new CBagItem();
         bagItem.SerializeFrom(msgStream);
         AddBagItem(bagItem);
     }
     return(true);
 }