Beispiel #1
0
        private void btn_shoot_Click(object sender, EventArgs e)
        {
            {
                Gun_PointAway.Hide();
                Gun_PointHead.Show();

                sound shoot_sound = new sound();
                shoot_sound.shoot_sound();

                round_count();
                chamber_count++;
                if (Chamber == 0)
                {
                    MessageBox.Show("There is no bullet game will automatically restart");
                    Restart();
                }

                if (playerGun[chamber_count] == 1)
                {
                    MessageBox.Show("Bang - You're dead\nBetter Lucks Next Time...\n\n***Restart Game***");
                    Restart();
                }
                else
                {
                    MessageBox.Show("Bang - You survived");
                    total_score     += 100; //User get 100 points each time they survived
                    label_score.Text = "Total Shots: " + total_score;
                }
                if (round == 6)
                {
                    MessageBox.Show("YOU WON!!!\n\n***End Game***\n***Restart Game***");
                    Restart();
                }
            }
        }
Beispiel #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();
            }
        }