示例#1
0
        public frmRaycaster()
        {
            InitializeComponent();
            System.Drawing.Bitmap canvas = new System.Drawing.Bitmap(pictureBox1.Width, pictureBox1.Height);

            m_rayCaster = new CRayCaster(canvas, this.BackColor);
            m_rayCaster.init();
            updatePicture(m_rayCaster.getImg());
        }
示例#2
0
        public frmRaycaster()
        {
            InitializeComponent();
            System.Drawing.Bitmap canvas = new System.Drawing.Bitmap(pictureBox1.Width, pictureBox1.Height);

            m_rayCaster = new CRayCaster(canvas, this.BackColor);
            m_rayCaster.init();
            updatePicture(m_rayCaster.getImg());
        }
示例#3
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            btnStart.Enabled = false;
            this.Focus();

            while (true)
            {
                m_rayCaster.run();
                updatePicture(m_rayCaster.getImg());

                this.Refresh();
                Application.DoEvents();
                if (!this.Visible)
                {
                    break;
                }
                System.Threading.Thread.Sleep(50);
            }
        }