Esempio n. 1
0
        /// <summary>
        /// Search for inventory component with maching index.
        /// </summary>
        public static MyInventory GetInventory(this MyEntity thisEntity, int index = 0)
        {
            MyInventoryBase foundInventoryBase = thisEntity.GetInventoryBase(index);
            MyInventory     rtnInventory       = foundInventoryBase as MyInventory;

            return(rtnInventory);
        }
Esempio n. 2
0
 public static MyInventory GetInventory(this MyEntity thisEntity, int index = 0) =>
 (thisEntity.GetInventoryBase(index) as MyInventory);