コード例 #1
0
        private void simpleOpenGlControl1_MouseClick(object sender, MouseEventArgs e)
        {
            if (renderer.load == true && renderer.option_screen == false)
            {
                // MessageBox.Show("x = " + e.X + "  " + "y = " + e.Y);
                if (e.X > XMin && e.X < XMax)
                {
                    if (e.Y > 114 && e.Y < 114 + 120)
                    {
                        //Play Button
                        renderer.Change_option_screen(true);
                        simpleButton1.Visible = true;
                        simpleButton2.Visible = true;
                        simpleButton3.Visible = true;
                        simpleButton4.Visible = true;

                        simpleButton5.Visible = true;
                        simpleButton6.Visible = true;

                        renderer.option_screen = true;
                        mouse_move             = true;
                    }
                    else if (e.Y > 639 && e.Y < 639 + 120)
                    {
                        Application.Exit();
                    }
                    else if (e.Y > 464 && e.Y < 646 + 120)
                    {
                        //about
                        renderer.Change_option_screen(true);
                        renderer.change_about(true);
                    }
                    else if (e.Y > 290 && e.Y < 290 + 120)
                    {
                        //scores
                        //MessageBox.Show("Scores");
                        Settings set = new Settings();
                        set.ShowDialog();
                    }
                }
            }
            else if (renderer.load == true && renderer.option_screen == true)
            {
                if (Renderer.GameSoundIsOpened)
                {
                    gunShoot.Stop();
                    gunShoot.Play();
                }

                renderer.draw         = true;
                renderer.cam.mAngleY += 0.1f;
                renderer.shootes();
            }
        }