예제 #1
0
        public void SetKeyBind(KeyBindName bindName, KeyCode keyCode)
        {
            if (this.KeyBinds.ContainsValue(keyCode))
            {
                this.KeyBinds[this.KeyBinds.FirstOrDefault(b => b.Value == keyCode).Key] = KeyCode.None;
            }

            this.KeyBinds[bindName] = keyCode;
        }
예제 #2
0
        public KeyCode GetKeyBindValue(KeyBindName bindName)
        {
            if (this.KeyBinds.TryGetValue(bindName, out var keyCode))
            {
                return(keyCode);
            }

            return(KeyCode.None);
        }