示例#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);
        }
示例#2
0
 public static MyInventory GetInventory(this MyEntity thisEntity, int index = 0) =>
 (thisEntity.GetInventoryBase(index) as MyInventory);