Ejemplo n.º 1
0
        // Close window event
        private void DrawWindow_FormClosing(object sender, FormClosingEventArgs e)
        {
            updateStream.Abort();
            windowStream.Abort();
            RPM.CloseProcess();

            // Close main process
            Environment.Exit(0);
        }
Ejemplo n.º 2
0
        // Update Thread
        private void Update(object sender)
        {
            while (IsGameRun())
            {
                // Resize
                if (IsResize)
                {
                    device.Resize(new Size2(rect.Width, rect.Height));
                    //Console.WriteLine("Resize {0}/{1}", rect.Width, rect.Height);
                    IsResize = false;
                }

                // Begin Draw
                device.BeginDraw();
                device.Clear(new Color4(0.0f, 0.0f, 0.0f, 0.0f));

                // Check Window State
                if (!IsMinimized)
                {
                    // Read & Draw Players
                    Read();

                    // Draw Credits
                    DrawTextCenter(rect.Width / 2 - 125, 5, 250, (int)font.FontSize, "EXTERNAL ESP BASE BY XTREME2010 EDITED BY CERRAOSSO", new Color(255, 214, 0, 255), true);

                    // Draw Spectator Count
                    DrawTextCenter(rect.Width / 2 - 100, rect.Height - (int)font.FontSize, 200, (int)font.FontSize, spectatorCount + " SPECTATOR(S) ON A SERVER", new Color(255, 214, 0, 255), true);

                    // Draw Menu
                    DrawMenu(5, 5);
                }

                // End Draw
                device.EndDraw();
                CalculateFrameRate();
                //Thread.Sleep(Interval);
            }

            // Close Process
            RPM.CloseProcess();
            // Exit
            Environment.Exit(0);
        }