コード例 #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();
                }
            }
        }
コード例 #2
0
        private void btn_load_Click(object sender, EventArgs e)
        {
            sound load_sound = new sound();

            load_sound.load_sound();

            LoadBullet();
        }
コード例 #3
0
        private void btn_spin_Click(object sender, EventArgs e)
        {
            sound spin_sound = new sound();

            spin_sound.spin_sound();

            SpinBullet();
            if (Chamber == 0)
            {
                MessageBox.Show("There is no bullet game will automatically restart");
                Restart();
            }
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: Apvirk/Ass1
        private void Form1_Load(object sender, EventArgs e)
        {
            sound play_back_sound = new sound();

            play_back_sound.play_back_sound();
        }