コード例 #1
0
        public static Dictionary <PrayerBook.Prayer, Point> GetPrayers()
        {
            Console.WriteLine("Please press 'A' while hovering over the first prayer slot");
            while (Console.ReadKey().Key != ConsoleKey.A)
            {
                Thread.Yield();
            }
            var cursorPos = Cursor.Position;

            Console.WriteLine("\nFirst prayer slot position: " + cursorPos);
            var prayers = PrayerSwitch.GeneratePrayerBook(cursorPos, 40, 40);

            return(prayers);
        }
コード例 #2
0
        private static void InputManagerOnOnKeyboardEvent(VirtualKeyCode key, KeyState state)
        {
            if (state != KeyState.Up)
            {
                return;
            }

            // Handle prayer state
            bool swappedPrayers = false;
            bool swappedItems   = false;

            swappedPrayers = PrayerSwitch.ActivePrayer(key);
            swappedItems   = AutoSwitch.ActiveSwitches(key, swappedPrayers);
            SpecialAttack.DoSpecialAttack(key, swappedItems, swappedPrayers);

            var exitKey = LowLevelInput.Converters.KeyCodeConverter.ToVirtualKeyCode((int)Settings.Instance.ExitKey);

            if (exitKey == key)
            {
                _stop = true;
            }
        }