Exemplo n.º 1
0
        /**
         * Called when the tank button is pressed in the buy menu.
         */
        public void TankButtonCallback()
        {
            if (_currentBuyTransaction == null)
            {
                _currentBuyTransaction = new BuyTransaction(UnitType.Tank, _localPlayer);
            }
            else
            {
                _currentBuyTransaction.AddUnit();
            }

            //buildUnit(UnitType.Tank);
            CurMouseMode = MouseMode.purchasing;
        }
Exemplo n.º 2
0
        public BuyTransaction Clone()
        {
            BuyTransaction clone = new BuyTransaction(UnitType, Owner);

            int unitCount = (GhostPlatoons.Count - 1) * MAX_PLATOON_SIZE + _smallestPlatoonSize;

            while (unitCount-- > 1)
            {
                clone.AddUnit();
            }

            return(clone);
        }