Esempio n. 1
0
        private KeyboardState GetDownKeyboardState(DirectionsKeys directionsKey)
        {
            var dict = new Dictionary <DirectionsKeys, bool>();

            foreach (var v in Enum.GetValues(typeof(DirectionsKeys)))
            {
                dict[(DirectionsKeys)v] = false;
            }

            dict[directionsKey] = true;

            return(new KeyboardState(dict, 0));
        }
Esempio n. 2
0
 public bool this[DirectionsKeys directionsKey] => _keyState[directionsKey];