Beispiel #1
0
        public ShopMenu(Player player)
        {
            InitializeComponent();
            shop = new SimpleGame.Logic.Shop(player);

            this.ShopInventoryPanel.RowCount = shop.Stock.Count;

            for (int i = 0; i < shop.Stock.Count; i++)
            {
                shopInventoryPriceLabel.Add(new Label());
                setupNewInventoryPriceLabel(i, this.shopInventoryPriceLabel, this.ShopInventoryPanel, shop.Stock);

                shopInventoryPicture.Add(new PictureBox());
                setupNewInventoryPicture(i, this.shopInventoryPicture, this.ShopInventoryPanel, shop.Stock, Action.Buy);

                shopInventoryLabel.Add(new Label());
                setupNewInventoryLabel(i, this.shopInventoryLabel, this.ShopInventoryPanel, shop.Stock);
            }

            this.showPlayerInventory();
        }
Beispiel #2
0
        public ShopMenu(Player player)
        {
            InitializeComponent();
            shop = new SimpleGame.Logic.Shop(player);

            this.ShopInventoryPanel.RowCount = shop.Stock.Count;

            for (int i = 0; i < shop.Stock.Count; i++)
            {
                shopInventoryPriceLabel.Add(new Label());
                setupNewInventoryPriceLabel(i, this.shopInventoryPriceLabel, this.ShopInventoryPanel, shop.Stock);

                shopInventoryPicture.Add(new PictureBox());
                setupNewInventoryPicture(i, this.shopInventoryPicture, this.ShopInventoryPanel, shop.Stock, Action.Buy);

                shopInventoryLabel.Add(new Label());
                setupNewInventoryLabel(i, this.shopInventoryLabel, this.ShopInventoryPanel, shop.Stock);
            }

            this.showPlayerInventory();
        }