示例#1
0
 public void Resize(System.Drawing.Size size)
 {
     if (_initialized)
     {
         EngineDll.ResizeBuffer(size.Width, size.Height);
     }
 }
示例#2
0
        private void menuFileCreateMap_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("You sure? You may lost all your progress", "Create new map", MessageBoxButtons.OKCancel);

            if (dr == System.Windows.Forms.DialogResult.OK)
            {
                EngineDll.newMap();
            }
        }
示例#3
0
        private void CameraType_Click(object sender, EventArgs e)
        {
            int type_ = Convert.ToInt32(((ToolStripMenuItem)sender).Tag);

            EngineDll.SetCameraType(type_);
            foreach (ToolStripMenuItem ts in menuEditCamera.DropDownItems)
            {
                ts.Checked = false;
            }
            ((ToolStripMenuItem)sender).Checked = true;
        }
示例#4
0
 private void menuFileSaveMap_Click(object sender, EventArgs e)
 {
     if (sfdMap.ShowDialog() == DialogResult.OK)
     {
         try {
             if (sfdMap.FileName != null)
             {
                 EngineDll.SaveMap(sfdMap.FileName, sfdMap.FileName.Length);
             }
         }
         catch (Exception ex) {
             MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
         }
     }
 }
示例#5
0
 public void SetActive(bool set)
 {
     EngineDll.SetActive(set);
     _active = set;
 }
示例#6
0
 public void Update()
 {
     EngineDll.Update();
 }
示例#7
0
 public bool Initialize(IntPtr mainHandle, IntPtr renderHandle)
 {
     _initialized = EngineDll.Initialize(mainHandle, renderHandle);
     return(_initialized);
 }