Beispiel #1
0
        private void BtnMall_Click(object sender, EventArgs e)
        {
            this.mall = ShoppingMall.Instance;

            this.pnlMall.Visible               = true;
            this.lblMallCash.Text              = this.ninja.Cash.ToString();
            this.lblMallShurikanPrice.Text     = "Price:" + this.mall.Goods[2].Price;
            this.lblMallShurikanPower.Text     = "Power: " + ((SpecialPower)this.mall.Goods[2]).AttackPower;
            this.lblMallBaseballPrice.Text     = "Price:" + this.mall.Goods[1].Price;
            this.lblMallBaseballPower.Text     = "Power: " + ((SpecialPower)this.mall.Goods[1]).AttackPower;
            this.lblMallHammerPrice.Text       = "Price:" + this.mall.Goods[0].Price;
            this.lblMallHammerPower.Text       = "Power: " + ((SpecialPower)this.mall.Goods[0]).AttackPower;
            this.lblMallTomahawkPrice.Text     = "Price:" + this.mall.Goods[3].Price;
            this.lblMallTomahawkPower.Text     = "Power: " + ((SpecialPower)this.mall.Goods[3]).AttackPower;
            this.lblMallPoisonDartPrice.Text   = "Price:" + this.mall.Goods[4].Price;
            this.lblMallPoisonDartPower.Text   = "Power: " + ((SpecialPower)this.mall.Goods[4]).AttackPower;
            this.lblMallForumflagPrice.Text    = "Price:" + this.mall.Goods[5].Price;
            this.lblMallForumflagPower.Text    = "Power: " + ((SpecialPower)this.mall.Goods[5]).AttackPower;
            this.lblCSharpBookPrice.Text       = "Price:" + this.mall.Goods[7].Price;
            this.lblCSharpBookPower.Text       = "Power: " + ((SpecialPower)this.mall.Goods[7]).AttackPower;
            this.lblMallHelpFromTeamPrice.Text = "Price:" + this.mall.Goods[8].Price;
            this.lblHelpFromTeamPower.Text     = "Power: " + ((SpecialPower)this.mall.Goods[8]).AttackPower;
            this.lblHelpFromTrainerPrice.Text  = "Price:" + this.mall.Goods[9].Price;
            this.lblHelpFromTrainerPower.Text  = "Power: " + ((SpecialPower)this.mall.Goods[9]).AttackPower;
            this.lblMallVirusPrice.Text        = "Price:" + this.mall.Goods[6].Price;
            this.lblMallVirusPower.Text        = "Power: " + ((SpecialPower)this.mall.Goods[6]).AttackPower;
        }
Beispiel #2
0
 private void BtnPlayground_Click(object sender, EventArgs e)
 {
     this.playground                        = Playground.Instance;
     this.pnlPlayground.Visible             = true;
     this.lblPlaygroundCash.Text            = this.ninja.Cash.ToString();
     this.lblPlaygroundPokerPrice.Text      = "Price: " + this.playground.Goods[0].Price;
     this.lblPlaygroundPokerEnergy.Text     = "Power: " + ((Recreation)this.playground.Goods[0]).UpgradeTotalEnergy;
     this.lblPlaygroundVideoPrice.Text      = "Price: " + this.playground.Goods[1].Price;
     this.lblPlaygroundVideoEnergy.Text     = "Power: " + ((Recreation)this.playground.Goods[1]).UpgradeTotalEnergy;
     this.lblPlaygroundBowlingPrice.Text    = "Price: " + this.playground.Goods[2].Price;
     this.lblPlaygroundBowlingEnergy.Text   = "Power: " + ((Recreation)this.playground.Goods[2]).UpgradeTotalEnergy;
     this.lblPlaygroundBilliardsPrice.Text  = "Price: " + this.playground.Goods[3].Price;
     this.lblPlaygroundBilliardsEnergy.Text = "Power: " + ((Recreation)this.playground.Goods[3]).UpgradeTotalEnergy;
     this.lblPlaygroundDancePrice.Text      = "Price: " + this.playground.Goods[4].Price;
     this.lblPlaygroundDanceEnergy.Text     = "Power: " + ((Recreation)this.playground.Goods[4]).UpgradeTotalEnergy;
 }
Beispiel #3
0
 private void BuyItem(CommercialBuilding building, ICommercial item, Button button)
 {
     try
     {
         int currentCash = ninja.Cash;
         building.Sell(item, ninja);
         if (currentCash == ninja.Cash)
         {
             MessageBox.Show("You rich the maximum of items that you can hold (10 items per category)!");
         }
     }
     catch (ArgumentException ex)
     {
         MessageBox.Show(ex.Message);
     }
     button.PerformClick();
 }
Beispiel #4
0
        private void btnPizza_Click(object sender, EventArgs e)
        {
            fastFood = FastFood.Instance;

            pnlPizza.Visible               = true;
            lblPizzaCashValue.Text         = ninja.Cash.ToString();
            lblPizzaCokePrice.Text         = "Price:" + fastFood.Goods[0].Price;
            lblPizzaCokeEnergy.Text        = "Energy: " + ((Energizer)fastFood.Goods[0]).HealingPoints;
            lblPizzaCoffeePrice.Text       = "Price:" + fastFood.Goods[1].Price;
            lblPizzaCoffeeEnergy.Text      = "Energy: " + ((Energizer)fastFood.Goods[1]).HealingPoints;
            lblPizzaIceCreamPrice.Text     = "Price:" + fastFood.Goods[2].Price;
            lblPizzaIceCreamEnergy.Text    = "Energy: " + ((Energizer)fastFood.Goods[2]).HealingPoints;;
            lblPizzaHamburgerPrice.Text    = "Price:" + fastFood.Goods[3].Price;
            lblPizzaHamburgerEnergy.Text   = "Energy: " + ((Energizer)fastFood.Goods[3]).HealingPoints;
            lblPizzaPizzaPrice.Text        = "Price:" + fastFood.Goods[4].Price;
            lblPizzaPizzaEnergy.Text       = "Energy: " + ((Energizer)fastFood.Goods[4]).HealingPoints;
            lblPizzaEnergydrinkPrice.Text  = "Price:" + fastFood.Goods[5].Price;
            lblPizzaEnergydrinkEnergy.Text = "Energy: " + ((Energizer)fastFood.Goods[5]).HealingPoints;
        }
Beispiel #5
0
        private void BtnPizza_Click(object sender, EventArgs e)
        {
            this.fastFood = FastFood.Instance;

            this.pnlPizza.Visible               = true;
            this.lblPizzaCashValue.Text         = this.ninja.Cash.ToString();
            this.btnPizza1.BackgroundImage      = GiveBackgroundImage(fastFood.Goods[0].Name);
            this.btnPizza2.BackgroundImage      = GiveBackgroundImage(fastFood.Goods[1].Name);
            this.btnPizza3.BackgroundImage      = GiveBackgroundImage(fastFood.Goods[2].Name);
            this.btnPizza4.BackgroundImage      = GiveBackgroundImage(fastFood.Goods[3].Name);
            this.btnPizza5.BackgroundImage      = GiveBackgroundImage(fastFood.Goods[4].Name);
            this.btnPizza6.BackgroundImage      = GiveBackgroundImage(fastFood.Goods[5].Name);
            this.lblPizzaCokeEnergy.Text        = "Energy: " + ((IEnergizer)this.fastFood.Goods[0]).HealingPoints;
            this.lblPizzaCoffeePrice.Text       = "Price:" + this.fastFood.Goods[1].Price;
            this.lblPizzaCoffeeEnergy.Text      = "Energy: " + ((IEnergizer)this.fastFood.Goods[1]).HealingPoints;
            this.lblPizzaIceCreamPrice.Text     = "Price:" + this.fastFood.Goods[2].Price;
            this.lblPizzaIceCreamEnergy.Text    = "Energy: " + ((IEnergizer)this.fastFood.Goods[2]).HealingPoints;
            this.lblPizzaHamburgerPrice.Text    = "Price:" + this.fastFood.Goods[3].Price;
            this.lblPizzaHamburgerEnergy.Text   = "Energy: " + ((IEnergizer)this.fastFood.Goods[3]).HealingPoints;
            this.lblPizzaPizzaPrice.Text        = "Price:" + this.fastFood.Goods[4].Price;
            this.lblPizzaPizzaEnergy.Text       = "Energy: " + ((IEnergizer)this.fastFood.Goods[4]).HealingPoints;
            this.lblPizzaEnergydrinkPrice.Text  = "Price:" + this.fastFood.Goods[5].Price;
            this.lblPizzaEnergydrinkEnergy.Text = "Energy: " + ((IEnergizer)this.fastFood.Goods[5]).HealingPoints;
        }