Exemplo n.º 1
0
 private void btnLoadLevel_Click(object sender, EventArgs e)
 {
     buf = new Bitmap(pnlBattlefield.Width, pnlBattlefield.Height);
     int m = Convert.ToInt32(nudLevelMSize.Value);
     int n = Convert.ToInt32(nudLevelNSize.Value);
     m_editor = new EditorController(n, m);
     pnlBattlefield.Width = n * m_editor.Width;
     pnlBattlefield.Height = m * m_editor.Height;
     if (rbnLevelLoad.Checked)
     {
         m_editor.LoadLevel(tbxLevelLoad.Text);
     }
     else
     {
         //m_editor.CreateField(n, m);
     }
     pnlBattlefield.Invalidate();
 }
Exemplo n.º 2
0
        private void btnLoadLevel_Click(object sender, EventArgs e)
        {
            buf = new Bitmap(pnlBattlefield.Width, pnlBattlefield.Height);
            int m = Convert.ToInt32(nudLevelMSize.Value);
            int n = Convert.ToInt32(nudLevelNSize.Value);

            m_editor              = new EditorController(n, m);
            pnlBattlefield.Width  = n * m_editor.Width;
            pnlBattlefield.Height = m * m_editor.Height;
            if (rbnLevelLoad.Checked)
            {
                m_editor.LoadLevel(tbxLevelLoad.Text);
            }
            else
            {
                //m_editor.CreateField(n, m);
            }
            pnlBattlefield.Invalidate();
        }
Exemplo n.º 3
0
 public LevelEditor(EditorController editor)
 {
     InitializeComponent();
     //m_editor = editor;
 }
Exemplo n.º 4
0
 public LevelEditor(EditorController editor)
 {
     InitializeComponent();
     //m_editor = editor;
 }