private void AddInventoryWithProbability(int row, int col, GameObject[,] boardTable)
 {
     if (random.NextDouble() < InventoryProbability)
     {
         boardTable[row, col] = InventoryFactory.Create(GetInventoryMobType(), new Position(row, col));
     }
 }
        public void Setup()
        {
            Resource = An.Item;
            var inventory        = An.Inventory;
            var inventoryFactory = new InventoryFactory(inventory, startInactive: true);

            InventoryComponent = inventoryFactory.Create();

            InventoryComponent.Initialized  += OnInitialized;
            InventoryComponent.Registered   += OnRegistered;
            InventoryComponent.Unregistered += OnUnregistered;
            InventoryComponent.Added        += OnAdded;
            InventoryComponent.Removed      += OnRemoved;

            InventoryComponent.gameObject.SetActive(true);
        }
Esempio n. 3
0
 public static InventoryCountViewModel ConvertToInventoryViewModel(this InventoryCount model) => InventoryFactory.Create(model);
 public static IEnumerable <ItemEntity> ConvertToEntity(this IEnumerable <IItem> items) => InventoryFactory.Create(items);
Esempio n. 5
0
 public static InventoryViewModel ConvertToItemViewModels(this IEnumerable <IItem> items) => InventoryFactory.Create(items);