private void Form_Start_Load(object sender, EventArgs e)
        {
            SdlDotNet.Core.Events.Tick += new EventHandler<SdlDotNet.Core.TickEventArgs>(Events_Tick);
            
            sdlMain = new SDL_Main();

            sdlMain.StartSDL();

            Thread thread = new Thread(new ThreadStart(SdlDotNet.Core.Events.Run));
            thread.IsBackground = false;
            thread.Name = "SDL.NET";
            thread.Priority = ThreadPriority.Normal;
            thread.Start();

        }
        private void btnAddObject_Click(object sender, EventArgs e)
        {
            float xMin = ((float)Convert.ToDouble(txtBxLeftRightPosition.Text)) - ((float)numericUpDownCubeSize.Value / 2);
            float xMax = xMin + ((float)numericUpDownCubeSize.Value);

            float yMin = (float)numericUpDownDistanceFromGround.Value;
            float yMax = yMin + (float)numericUpDownCubeSize.Value;

            float zMin = -(float)this.customNumericUpDownCurrentPosition.Value;
            float zMax = zMin + (float)numericUpDownCubeSize.Value;

            Cube objectToAdd = new Cube(4, 1, 1, xMin, yMin, zMin, xMax, yMax, zMax);

            SDL_Main.AddObjectToDrawList(objectToAdd);
        }
Example #3
0
        private void Form_Start_Load(object sender, EventArgs e)
        {
            SdlDotNet.Core.Events.Tick += new EventHandler <SdlDotNet.Core.TickEventArgs>(Events_Tick);

            sdlMain = new SDL_Main();

            sdlMain.StartSDL();

            Thread thread = new Thread(new ThreadStart(SdlDotNet.Core.Events.Run));

            thread.IsBackground = false;
            thread.Name         = "SDL.NET";
            thread.Priority     = ThreadPriority.Normal;
            thread.Start();
        }