Inheritance: BaseObjectManager
		public InventoryEntity(MyObjectBuilder_Inventory definition, Object backingObject)
			: base(definition, backingObject)
		{
			m_itemManager = new InventoryItemManager(this, backingObject, InventoryGetItemListMethod);
			m_itemManager.Refresh();
			m_itemDeltaQueue = new Queue<InventoryDelta>();
		}
Exemple #2
0
 public InventoryEntity(MyObjectBuilder_Inventory definition, Object backingObject)
     : base(definition, backingObject)
 {
     m_itemManager = new InventoryItemManager(this, backingObject, InventoryGetItemListMethod);
     m_itemManager.Refresh();
     m_itemDeltaQueue = new Queue <InventoryDelta>();
 }
        public InventoryEntity(MyObjectBuilder_Inventory definition)
            : base(definition)
        {
            m_itemManager = new InventoryItemManager(this);

            List<InventoryItemEntity> itemList = new List<InventoryItemEntity>();
            foreach (MyObjectBuilder_InventoryItem item in definition.Items)
            {
                InventoryItemEntity newItem = new InventoryItemEntity(item);
                newItem.Container = this;
                itemList.Add(newItem);
            }
            m_itemManager.Load(itemList);
        }
        public InventoryEntity(MyObjectBuilder_Inventory definition)
            : base(definition)
        {
            m_itemManager = new InventoryItemManager(this);

            List <InventoryItemEntity> itemList = new List <InventoryItemEntity>();

            foreach (MyObjectBuilder_InventoryItem item in definition.Items)
            {
                InventoryItemEntity newItem = new InventoryItemEntity(item);
                newItem.Container = this;
                itemList.Add(newItem);
            }
            m_itemManager.Load(itemList);
        }