Пример #1
0
 /// <summary>
 /// Funkcja inicjująca tekst przycisku kupna piechoty
 /// </summary>
 /// <param name="button"></param>
 /// <param name="infantry"></param>
 private void InitButtonTextInfantry(Button button, Infantry infantry)
 {
     button.Text = "Cena: " + infantry.TotalCost +
                   "\nZdrowie: " + infantry.Health +
                   "\nPenetracja pancerza: " + infantry.ArmorPenetration +
                   "\nZadawane obrażenia:\nCele lekkie: " + infantry.FirePowerLight +
                   "\nCele ciężkie: " + infantry.FirePowerHeavy +
                   "\nCele powietrzne: " + infantry.FirePowerAir;
 }
Пример #2
0
        /// <summary>
        /// Konstrukor
        /// </summary>
        /// <param name="playerArmy"></param>
        /// <param name="formMain"></param>
        public FormShop(Army playerArmy, FormMain formMain)
        {
            InitializeComponent();
            this.playerArmy = playerArmy;
            this.formMain   = formMain;
            lightInfantry   = unitFactory.CreateInfantry.LightInfantry();
            commandos       = unitFactory.CreateInfantry.Commandos();
            heavyInfantry   = unitFactory.CreateInfantry.HeavyInfantry();
            aAInfantry      = unitFactory.CreateInfantry.AAInfantry();
            aTInfantry      = unitFactory.CreateInfantry.ATInfantry();

            lightTank     = unitFactory.CreateTank.LightTank();
            mediumTank    = unitFactory.CreateTank.MediumTank();
            heavyTank     = unitFactory.CreateTank.HeavyTank();
            mBTank        = unitFactory.CreateTank.MBTank();
            tankDestroyer = unitFactory.CreateTank.TankDestroyer();

            fighter      = unitFactory.CreatePlane.Fighter();
            lightBomber  = unitFactory.CreatePlane.LightBomber();
            heavyBomber  = unitFactory.CreatePlane.HeavyBomber();
            multipurpose = unitFactory.CreatePlane.MultiPurpose();
        }