Example #1
0
        private void GameMain_Load(object sender, EventArgs e)
        {
            Pic_blood.Hide(); Pic_Broken.Hide();
            Pic_smokeLeft.Hide(); Pic_smokeRight.Hide();
            Pic_GunSpin.Hide(); Gun_PointAway.Hide();
            timer_bullet.Stop(); timer_gun.Start();
            Pic_bulletLeft.Hide();

            GameSound music = new GameSound();

            music.background_music();
        }
Example #2
0
        private void Btn_shootMe_Click(object sender, EventArgs e)
        {
            GameSound shotsound = new GameSound();

            shotsound.shot_sound();
            Pic_GunSpin.Hide(); Pic_smokeLeft.Show();
            Gun_PointAway.Hide(); Gun_PointHead.Show();
            Fn_Round();
            chamberPull++;

            if (playerChamber == 0)
            {
                chamberPull   = 0;
                round         = 0;
                Shoot_away    = 0;
                total_score   = 0;
                playerChamber = 0;

                MessageBox.Show("WARNING: There is no bullet in the chamber");
            }
            else if (playerGun[chamberPull] == 1)
            {
                timer_bullet.Start();

                GameSound girlScream = new GameSound();
                girlScream.girl_scream();
                Pic_blood.Show();

                MessageBox.Show("Ohhh nooo!! You're dead!\nBetter Lucks Next Time...\n\n***Restart Game***");
                Pic_smokeLeft.Hide();
                Restart();
            }
            else if (playerChamber != 0 && playerGun[chamberPull] != 1)
            {
                total_score += 20;
                MessageBox.Show("You survived");
                Label_score.Text = "Total Score: " + total_score;
                Pic_smokeLeft.Hide();
            }
            if (round >= 6)
            {
                GameSound girlOhYeah = new GameSound();
                girlOhYeah.girl_OhYeah();
                MessageBox.Show("YOU WON!!!\n\n***End Game***\n***Restart Game***");
                Restart();
            }
        }
Example #3
0
        private void Btn_shootAway_Click(object sender, EventArgs e)
        {
            GameSound shotsound = new GameSound();

            shotsound.shot_sound();
            Pic_smokeLeft.Hide(); Pic_GunSpin.Hide();
            Gun_PointAway.Show(); Pic_smokeRight.Show();
            Pic_Broken.Show(); Gun_PointHead.Hide();
            PointAway();
            Shoot_away++;

            if (playerChamber == 0)
            {
                MessageBox.Show("WARNING: There is no bullet in the chamber");
            }
            if (Shoot_away <= 2)     //If shoot away is less or equal to 2
            {
                total_score += 10;
                MessageBox.Show("You survived");
                Label_score.Text = "Total Score: " + total_score;
                Pic_smokeRight.Hide();
                Pic_Broken.Hide();
            }
            if (Shoot_away == 2)     //If shoot away is equal to 2, this messsage will show
            {
                MessageBox.Show("WARNING: If you shoot away more than 2 times - game will restart");
                Pic_smokeRight.Hide();
                Pic_Broken.Hide();
            }
            if (Shoot_away > 2 && playerGun[chamberPull] == 0)     //Shoot Away more than 2 and bullet has not been fired
            {
                MessageBox.Show("***Game Restart***\nYou shoot away more than 2 times and the bullet has not been fired...");

                Restart();
            }
            if (round == 6)     //if round is 6
            {
                GameSound girlOhYeah = new GameSound();
                girlOhYeah.girl_OhYeah();
                MessageBox.Show("YOU WON!!!\n\n***End Game***\n***Restart Game***");
                Shoot_away = 0;
                chamberPull++;

                Restart();
            }
        }