示例#1
0
        /// <summary>
        /// Button for produce unit
        /// </summary>
        /// <param name="unitType">Type of unit</param>
        /// <returns>UI representing Unit Button corresponding to the type given</returns>
        public ProduceUnitButton BuildProduceUnitButton(string unitType)
        {
            Rectangle sourceRect = new Rectangle(0, GameConfig.SELECT_AVATAR_START_Y, 76, 76);

            ProduceUnitButton button = new ProduceUnitButton(game, sourceRect, unitType);

            button.UnitType = unitType;
            return(button);
        }
示例#2
0
        public ProduceUnitButton BuildProduceUnitButton(string unitType)
        {
            Rectangle sourceRect;

            //if (unitType.Equals("soldier"))
            //{
            sourceRect = new Rectangle(0, GameConfig.SELECT_AVATAR_START_Y, 76, 76);
            //}

            ProduceUnitButton button = new ProduceUnitButton(game, sourceRect, unitType);

            button.UnitType = unitType;

            return(button);
        }
        /// <summary>
        /// Button for produce unit
        /// </summary>
        /// <param name="unitType">Type of unit</param>
        /// <returns>UI representing Unit Button corresponding to the type given</returns>
        public ProduceUnitButton BuildProduceUnitButton(string unitType)
        {
            Rectangle sourceRect = new Rectangle(0, GameConfig.SELECT_AVATAR_START_Y, 76, 76);

            ProduceUnitButton button = new ProduceUnitButton(game, sourceRect, unitType);
            button.UnitType = unitType;
            return button;
        }
        public ProduceUnitButton BuildProduceUnitButton(string unitType)
        {
            Rectangle sourceRect;
            //if (unitType.Equals("soldier"))
            //{
                sourceRect = new Rectangle(0, GameConfig.SELECT_AVATAR_START_Y, 76, 76);
            //}

            ProduceUnitButton button = new ProduceUnitButton(game, sourceRect, unitType);
            button.UnitType = unitType;

            return button;
        }