コード例 #1
0
 private void picBLeaWood_Click(object sender, EventArgs e)
 {
     if (mainVariables.Characters_Lea_WoodAllowed)
     {
         mainVariables.Characters_Lea_ChopCount++;
         if (mainVariables.Characters_Lea_ChopCount >= 10)
         {
             mainVariables.Characters_Lea_ChopCount = 0;
             main_Dialog = new Main_Dialog(mainVariables, mainMethods, "Lea", this, mainFrame, 3);
             main_Dialog.Show();
             lblUiMana.Text = mainVariables.Character_Crystals.ToString();
         }
     }
 }
コード例 #2
0
        //PIC B GO FRONT
        private void PicBGoFront_Click(object sender, EventArgs e)
        {
            switch (mainVariables.StoryLine_Progress)
            {
            case 1:
                mainVariables.StoryLine_Progress++;
                GameStart gameStart = new GameStart(mainMethods, mainVariables, mainFrame);
                gameStart.Show();
                this.Close();
                break;

            case 3:
                main_Dialog = new Main_Dialog(mainVariables, mainMethods, "Ending", this, mainFrame);
                main_Dialog.Show();
                break;
            }
        }
コード例 #3
0
        private void Initializing_Gamestart(MainMethods givenMainMethods, MainVariables givenMainVariables, MainFrame givenMainFrame)
        {
            mainMethods    = givenMainMethods;
            mainVariables  = givenMainVariables;
            mainFrame      = givenMainFrame;
            inGameMenu     = new IngameMenu(mainVariables, mainMethods, this, mainFrame);
            oneSecondTimer = new Timer();
            lblUiMana.Text = mainVariables.Character_Crystals.ToString();

            try
            { mainVariables.Music_Soundplayer.Stop(); }
            catch (Exception ex) { }

            //What is loaded depends on the place, case 1 is starting area
            switch (mainVariables.StoryLine_Progress)
            {
            case 1:
                mainMethods.Form_Background_Change(this, mainVariables.FirstScreen_Background);
                mainMethods.Character_PictureBox(mainVariables.Character_Picture, picBMainHero);
                mainMethods.Fill_PictureBox(picBSideCharOne, mainVariables.Characters_Maria_Bitmap); picBSideCharOne.Visible = true;
                if (mainVariables.Characters_Maria_Progression != 10)
                {
                    mainMethods.Fill_PictureBox(PicBGoFront, mainVariables.UserInterface_TowardsForest);
                    mainMethods.Fill_PictureBox(PicBFlower1, mainVariables.Items_SingleFlowerBM); PicBFlower1.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower2, mainVariables.Items_SingleFlowerBM); PicBFlower2.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower3, mainVariables.Items_SingleFlowerBM); PicBFlower3.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower4, mainVariables.Items_SingleFlowerBM); PicBFlower4.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower5, mainVariables.Items_SingleFlowerBM); PicBFlower5.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower6, mainVariables.Items_SingleFlowerBM); PicBFlower6.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower7, mainVariables.Items_SingleFlowerBM); PicBFlower7.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower8, mainVariables.Items_SingleFlowerBM); PicBFlower8.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower9, mainVariables.Items_SingleFlowerBM); PicBFlower9.Visible   = true;
                    mainMethods.Fill_PictureBox(PicBFlower10, mainVariables.Items_SingleFlowerBM); PicBFlower10.Visible = true;
                }
                break;

            //case 2 is forest
            case 2:
                mainVariables.UserInterface_DialogboxActive = true;
                mainMethods.Form_Background_Change(this, mainVariables.Background_Forest);
                mainMethods.Fill_PictureBox(picBGoblin, mainVariables.Characters_GoblinBM); picBGoblin.Visible = true;
                picBGoblin.Visible = true;
                main_Dialog        = new Main_Dialog(mainVariables, mainMethods, "Goblin", this, mainFrame);
                main_Dialog.Show();
                break;

            //case 3 is village
            case 3:
                mainMethods.Form_Background_Change(this, mainVariables.Background_City);
                mainMethods.Fill_PictureBox(picBJack, mainVariables.Characters_JackBM);
                if (!mainVariables.Characters_KittenClicked)
                {
                    mainMethods.Fill_PictureBox(picBKitten, mainVariables.Characters_KittenBM);
                }
                if (!mainVariables.Characters_JacksKittenSaved)
                {
                    mainMethods.Fill_PictureBox(picBStuckKitten, mainVariables.Characters_StuckKittenBM);
                }
                mainMethods.Fill_PictureBox(picBJorn, mainVariables.Characters_JornBM);
                picBJorn.Location = new Point(438, 263);
                picBJack.Location = new Point(88, 175);
                mainMethods.Fill_PictureBox(PicBLea, mainVariables.Characters_LeaBM);
                mainMethods.Fill_PictureBox(picBLeaWood, mainVariables.Characters_Lea_Wood);
                if (!mainVariables.Characters_Vendor_TestBought)
                {
                    mainMethods.Fill_PictureBox(picBVendorTest, mainVariables.Items_FinishedTestBM);
                }
                if (!mainVariables.Characters_Vendor_RopeBought)
                {
                    mainMethods.Fill_PictureBox(picBVendorRope, mainVariables.Items_RopeBM);
                }
                mainMethods.Fill_PictureBox(picBVendor, mainVariables.Characters_VendorBM);
                mainMethods.Fill_PictureBox(picBValeria, mainVariables.Characters_Valeria);
                mainMethods.Fill_PictureBox(PicBGoFront, mainVariables.Icon_CityGoTemple);

                break;

            //case 4 is the ending  //<5 //>= 5 && < 9 // 8<
            case 4:

                mainMethods.Fill_PictureBox(picBGoddess, mainVariables.Characters_Goddess);
                mainMethods.Form_Background_Change(this, mainVariables.Backgrounds_Black);
                if (mainVariables.Character_Honor < 5)
                {
                    main_Dialog = new Main_Dialog(mainVariables, mainMethods, "Goddess", this, mainFrame, 11);
                    main_Dialog.Show();
                    mainVariables.UserInterface_DialogboxActive = true;
                }
                else if (mainVariables.Character_Honor > 8)
                {
                    main_Dialog = new Main_Dialog(mainVariables, mainMethods, "Goddess", this, mainFrame, 13);
                    main_Dialog.Show();
                    mainVariables.UserInterface_DialogboxActive = true;
                }
                else
                {
                    main_Dialog = new Main_Dialog(mainVariables, mainMethods, "Goddess", this, mainFrame, 12);
                    main_Dialog.Show();
                    mainVariables.UserInterface_DialogboxActive = true;
                }
                main_Dialog.Location = new Point(1000, 300);
                picBGoddess.Location = new Point(171, 115);
                break;
            }

            // 0) Flowercircle 1) Health potion 2) Sword 3) Finished test 4) Rope 5) Super axe 6) Chicken leg 7) Mirror 8) Giant nut 9) Single flower

            //Adding items to the itemlist and adding bitmaps for those item in a second List
            mainVariables.Items_List.Add(mainVariables.Items_FlowerCircle); mainVariables.Items_List.Add(mainVariables.Items_HealthPotion); mainVariables.Items_List.Add(mainVariables.Items_Sword);
            mainVariables.Items_List.Add(mainVariables.Items_FinishedTest); mainVariables.Items_List.Add(mainVariables.Items_Rope); mainVariables.Items_List.Add(mainVariables.Items_SuperAxe);
            mainVariables.Items_List.Add(mainVariables.Items_ChickenLeg); mainVariables.Items_List.Add(mainVariables.Items_Mirror); mainVariables.Items_List.Add(mainVariables.Items_GiantNut);
            mainVariables.Items_List.Add(mainVariables.Items_SingleFlower);
            //--
            mainVariables.Items_Bitmap_List.Add(mainVariables.Items_FlowerCircleBM); mainVariables.Items_Bitmap_List.Add(mainVariables.Items_HealthPotionBM); mainVariables.Items_Bitmap_List.Add(mainVariables.Items_SwordBM);
            mainVariables.Items_Bitmap_List.Add(mainVariables.Items_FinishedTestBM); mainVariables.Items_Bitmap_List.Add(mainVariables.Items_RopeBM); mainVariables.Items_Bitmap_List.Add(mainVariables.Items_SuperAxeBM);
            mainVariables.Items_Bitmap_List.Add(mainVariables.Items_ChickenLegBM); mainVariables.Items_Bitmap_List.Add(mainVariables.Items_MirrorBM); mainVariables.Items_Bitmap_List.Add(mainVariables.Items_GiantNutBm);
            mainVariables.Items_Bitmap_List.Add(mainVariables.Items_SingleFlowerBM);

            if (mainVariables.StoryLine_Progress == 1 || mainVariables.StoryLine_Progress == 2 || mainVariables.StoryLine_Progress == 3)
            {
                Main_UI();
            }
        }
コード例 #4
0
 private void picBValeria_Click(object sender, EventArgs e)
 {
     main_Dialog = new Main_Dialog(mainVariables, mainMethods, "Valeria", this, mainFrame);
     main_Dialog.Show();
 }
コード例 #5
0
 //stuck kitten
 private void picBStuckKitten_Click(object sender, EventArgs e)
 {
     main_Dialog = new Main_Dialog(mainVariables, mainMethods, "StuckKitten", this, mainFrame);
     main_Dialog.Show();
 }
コード例 #6
0
 //Clicking on the Goblin
 private void picBGoblin_Click(object sender, EventArgs e)
 {
     main_Dialog = new Main_Dialog(mainVariables, mainMethods, "Goblin", this, mainFrame);
     main_Dialog.Show();
     mainVariables.UserInterface_DialogboxActive = true;
 }