private static void AddShopUnits(int amount, IShopPanelView shopPanel, IUnitPool <IShopUnitModel> unitPool, IShopFactory shopFactory, IRandomUnitGenerator unitGenerator) { amount.Times(() => unitPool.AddUnit(shopFactory.Create(unitGenerator.GetRandomUnitId(), shopPanel.UnitParent))); // create unit controller with preparation unit factory }
private void MoveToPool(bool isOnBoard) { IsOnBoard = isOnBoard; if (isOnBoard) { _benchPool.RemoveUnit(this); _boardPool.AddUnit(this); } else { _benchPool.AddUnit(this); _boardPool.RemoveUnit(this); } }