Esempio n. 1
0
    public EconEventArgs RemoveKeys(params KeyCode[] codes)
    {
        foreach (var code in codes)
        {
            KeysPressed.Remove(code);
        }

        return(this);
    }
Esempio n. 2
0
        public void Action(string action)
        {
            var actionData = action.Split(' ');

            switch (actionData[0])
            {
            case "key_down":
            {
                Enum.TryParse <ControlActions>(actionData[1], true, out var result);
                KeysPressed.Add(result);
                break;
            }

            case "key_up":
            {
                Enum.TryParse <ControlActions>(actionData[1], true, out var result);
                KeysPressed.Remove(result);
                break;
            }
            }
        }
Esempio n. 3
0
 public void KeyUp(object sender, KeyEventArgs e)
 {
     KeysPressed.Remove(e.Code);
 }