コード例 #1
0
 private void swordIcon_Click(object sender, EventArgs e)
 {
     if (game.CheckPlayerInventory("Sword"))
     {
         hideIconBorders();
         game.Equip("Sword");
         swordIcon.BorderStyle = BorderStyle.FixedSingle;
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: wicked2/TheQuest
 private void inventorySword_Click(object sender, EventArgs e)
 {
     if (game.CheckPlayerInventory("Sword"))
     {
         game.Equip("Sword");
     }
     inventoryReset();
     inventorySword.BorderStyle = BorderStyle.FixedSingle;
     UpdateCharacters();
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: aschroede/Personal-Projects
 private void bowItem_Click(object sender, EventArgs e)
 {
     if (game.CheckPlayerInventory("Bow"))
     {
         game.Equip("Bow");
         clearBorders();
         bowItem.BorderStyle = BorderStyle.FixedSingle;
         bringAttackButtonsBack();
     }
 }
コード例 #4
0
        private void swordInventory_Click(object sender, EventArgs e)
        {
            if (game.CheckPlayerInventory("Sword"))
            {
                game.Equip("Sword");
            }

            swordInventory.BorderStyle      = BorderStyle.Fixed3D;
            bowInventory.BorderStyle        = BorderStyle.None;
            maceInventory.BorderStyle       = BorderStyle.None;
            bluePotionInventory.BorderStyle = BorderStyle.None;
            redPotionInventory.BorderStyle  = BorderStyle.None;
        }
コード例 #5
0
 private void pictureBoxItemSword_Click(object sender, EventArgs e)
 {
     buttonAttackDown.Show();
     buttonAttackLeft.Show();
     buttonAttackRight.Show();
     buttonAttackUp.Text = "↑";
     if (_game.CheckPlayerInventory("Sword"))
     {
         _game.Equip("Sword");
         SetAllPictureBoxBordersToNone();
         pictureBoxItemSword.BorderStyle = BorderStyle.FixedSingle;
     }
 }
コード例 #6
0
 private void inventorySword_Click(object sender, EventArgs e)
 {
     if (game.CheckPlayerInventory("Sword"))
     {
         game.Equip("Sword");
         inventorySword.BorderStyle      = BorderStyle.FixedSingle;
         inventoryMace.BorderStyle       = BorderStyle.None;
         inventoryBow.BorderStyle        = BorderStyle.None;
         inventoryBluePotion.BorderStyle = BorderStyle.None;
         inventoryRedPotion.BorderStyle  = BorderStyle.None;
         attackDown.Visible  = true;
         attackLeft.Visible  = true;
         attackRight.Visible = true;
         attackUp.Text       = "↑";
     }
 }
コード例 #7
0
ファイル: Form1.cs プロジェクト: Greyskin87/TheQuest
        private void swordInventory_Click(object sender, EventArgs e)
        {
            string weaponName = "Sword";

            if (game.CheckPlayerInventory(weaponName))
            {
                game.Equip(weaponName);
            }

            swordInventory.BorderStyle      = BorderStyle.FixedSingle;
            bluePotionInventory.BorderStyle = BorderStyle.None;
            redPotionInventory.BorderStyle  = BorderStyle.None;
            bowInventory.BorderStyle        = BorderStyle.None;
            maceInventory.BorderStyle       = BorderStyle.None;

            groupBox2.Visible = true;
        }
コード例 #8
0
 private void selectInventoryItem(PictureBox pictureBox, string weaponName)
 {
     clearPictureBoxBorders();
     pictureBox.BorderStyle = BorderStyle.Fixed3D;
     if (game.CheckPlayerInventory(weaponName))
     {
         game.Equip(weaponName);
     }
 }
コード例 #9
0
ファイル: Dungeon.cs プロジェクト: mrtars2000/TheQuest
 private void SelectInventoryItem(PictureBox itemSprite, string itemName, string weaponType)
 {
     if (game.CheckPlayerInventory(itemName))
     {
         game.Equip(itemName);
         RemoveInventorySpriteBorders();
         itemSprite.BorderStyle = BorderStyle.FixedSingle;
         SetupAttackButtons(weaponType);
     }
 }
コード例 #10
0
        private void SelectInventoryItem(string weaponName, PictureBox weaponPicture)
        {
            if (game.CheckPlayerInventory(weaponName))
            {
                game.Equip(weaponName);

                RemoveAllInventorySelections();
                weaponPicture.BorderStyle = BorderStyle.FixedSingle;
            }
        }
コード例 #11
0
        private void weaponSword_Click(object sender, EventArgs e)
        {
            if (game.CheckPlayerInventory("Sword"))
            {
                game.Equip("Sword");
                weaponSword.BorderStyle      = BorderStyle.FixedSingle;
                weaponBow.BorderStyle        = BorderStyle.None;
                weaponMace.BorderStyle       = BorderStyle.None;
                weaponBluePotion.BorderStyle = BorderStyle.None;
                weaponRedPotion.BorderStyle  = BorderStyle.None;

                //Change other attack buttons back in case potion was equipped
                attackUp.Text      = "↑";
                attackButtons.Text = "Attack";
                //Show the other attack buttons
                attackRight.Visible = true;
                attackDown.Visible  = true;
                attackLeft.Visible  = true;
            }
        }
コード例 #12
0
ファイル: Form1.cs プロジェクト: raduATL/TheQuest
        private void inventorySwordPictureBox_Click(object sender, EventArgs e)
        {
            string weaponName = "Sword";

            if (game.CheckPlayerInventory(weaponName))
            {
                game.Equip(weaponName);
                inventorySwordPictureBox.BorderStyle      = BorderStyle.FixedSingle;
                inventoryBowPictureBox.BorderStyle        = BorderStyle.None;
                inventoryMacePictureBox.BorderStyle       = BorderStyle.None;
                inventoryBluePotionPictureBox.BorderStyle = BorderStyle.None;
                inventoryRedPotionPictureBox.BorderStyle  = BorderStyle.None;
                inventoryBombPictureBox.BorderStyle       = BorderStyle.None;
                drawAttackButton();
            }
        }