示例#1
0
        void CheckInput()
        {
            bool keyDown = false;

            m_inputCooldown -= 0.01f;
            if (m_inputCooldown <= 0)
            {
                if (tabControl1.SelectedIndex == 1)
                {
                    if (Mem.Keystate(Keys.F1))
                    {
                        SpawnButton(0, 0);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F2))
                    {
                        SpawnButton(0, 1);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F3))
                    {
                        SpawnButton(0, 2);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F4))
                    {
                        SpawnButton(0, 3);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F5))
                    {
                        SpawnButton(1, 0);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F6))
                    {
                        SpawnButton(1, 1);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F7))
                    {
                        SpawnButton(1, 2);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F8))
                    {
                        SpawnButton(1, 3);
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F9))
                    {
                        WarpTo();
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F10))
                    {
                        SavePosition();
                        keyDown = true;
                    }
                }
                else if (tabControl1.SelectedIndex == 2)
                {
                    if (Mem.Keystate(Keys.F1))
                    {
                        StartRecording();
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F2))
                    {
                        StartPlayback();
                        keyDown = true;
                    }
                    else if (Mem.Keystate(Keys.F3))
                    {
                        StartPlaybackAI();
                        keyDown = true;
                    }
                }

                if (keyDown)
                {
                    m_inputCooldown = INPUTDELAY;
                }
            }
        }