コード例 #1
0
 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
 }
コード例 #2
0
        private void MoveToPool(bool isOnBoard)
        {
            IsOnBoard = isOnBoard;

            if (isOnBoard)
            {
                _benchPool.RemoveUnit(this);
                _boardPool.AddUnit(this);
            }
            else
            {
                _benchPool.AddUnit(this);
                _boardPool.RemoveUnit(this);
            }
        }