Ejemplo n.º 1
0
 public KeyAction(string name, UnityEngine.KeyCode primaryKey, UnityEngine.KeyCode secondaryKey, string axisName)
 {
     this.ActionName = name;
     this.PrimaryKey = primaryKey;
     this.SecondaryKey = secondaryKey;
     this.AxisName = axisName;
 }
Ejemplo n.º 2
0
 static int GetCharacterIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UILabel             obj  = (UILabel)ToLua.CheckObject <UILabel>(L, 1);
         int                 arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.KeyCode arg1 = (UnityEngine.KeyCode)ToLua.CheckObject(L, 3, typeof(UnityEngine.KeyCode));
         int                 o    = obj.GetCharacterIndex(arg0, arg1);
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 3
0
    static int get_keyCode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.InputEvent obj = (FairyGUI.InputEvent)o;
            UnityEngine.KeyCode ret = obj.keyCode;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index keyCode on a nil value"));
        }
    }
    static int set_keyCode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Event   obj  = (UnityEngine.Event)o;
            UnityEngine.KeyCode arg0 = (UnityEngine.KeyCode)ToLua.CheckObject(L, 2, typeof(UnityEngine.KeyCode));
            obj.keyCode = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index keyCode on a nil value"));
        }
    }
Ejemplo n.º 5
0
        static StackObject *GetKeyUp_13(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.KeyCode @key = (UnityEngine.KeyCode) typeof(UnityEngine.KeyCode).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = UnityEngine.Input.GetKeyUp(@key);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
    static int GetKeyUp(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.KeyCode)))
        {
            UnityEngine.KeyCode arg0 = (UnityEngine.KeyCode)ToLua.ToObject(L, 1);
            bool o;

            try
            {
                o = UnityEngine.Input.GetKeyUp(arg0);
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        else if (count == 1 && ToLua.CheckTypes(L, 1, typeof(string)))
        {
            string arg0 = ToLua.ToString(L, 1);
            bool   o;

            try
            {
                o = UnityEngine.Input.GetKeyUp(arg0);
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.Input.GetKeyUp");
        }

        return(0);
    }
Ejemplo n.º 7
0
        static StackObject *SetResult_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.KeyCode @result = (UnityEngine.KeyCode) typeof(UnityEngine.KeyCode).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            ET.ETTask <UnityEngine.KeyCode> instance_of_this_method = (ET.ETTask <UnityEngine.KeyCode>) typeof(ET.ETTask <UnityEngine.KeyCode>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetResult(@result);

            return(__ret);
        }
Ejemplo n.º 8
0
 /*
  * ▒██████▒▒████████▒████████
  * ██▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒██▒▒▒
  * ▒██████▒▒████████▒▒▒▒██▒▒▒
  * ▒▒▒▒▒▒██▒██▒▒▒▒▒▒▒▒▒▒██▒▒▒
  * ▒██████▒▒████████▒▒▒▒██▒▒▒
  */
 public bool SetKey(string keyName, UnityEngine.KeyCode button)
 {
     /* If duplicate, then flip */
     if (Key.ContainsValue(button))
     {
         Key[Value[button]]        = Key[keyName];
         Key[keyName]              = button;
         Value[Key[Value[button]]] = Value[button];
         Value[button]             = keyName;
     }
     else
     {
         Value.Remove(Key[keyName]);
         Value.Add(button, keyName);
         Key[keyName] = button;
     }
     return(UnityEngine.Input.GetKeyDown(button));
 }
Ejemplo n.º 9
0
        /// <summary>
        /// Translates control key's SFML key code to GWEN's code.
        /// </summary>
        /// <param name="sfKey">SFML key code.</param>
        /// <returns>GWEN key code.</returns>
        private static Key TranslateKeyCode(UnityEngine.KeyCode sfKey)
        {
            switch (sfKey)
            {
            case UnityEngine.KeyCode.Backspace: return(Key.Backspace);

            case UnityEngine.KeyCode.Return: return(Key.Return);

            case UnityEngine.KeyCode.Escape: return(Key.Escape);

            case UnityEngine.KeyCode.Tab: return(Key.Tab);

            case UnityEngine.KeyCode.Space: return(Key.Space);

            case UnityEngine.KeyCode.UpArrow: return(Key.Up);

            case UnityEngine.KeyCode.DownArrow: return(Key.Down);

            case UnityEngine.KeyCode.LeftArrow: return(Key.Left);

            case UnityEngine.KeyCode.RightArrow: return(Key.Right);

            case UnityEngine.KeyCode.Home: return(Key.Home);

            case UnityEngine.KeyCode.End: return(Key.End);

            case UnityEngine.KeyCode.Delete: return(Key.Delete);

            case UnityEngine.KeyCode.LeftControl: return(Key.Control);

            case UnityEngine.KeyCode.LeftAlt: return(Key.Alt);

            case UnityEngine.KeyCode.LeftShift: return(Key.Shift);

            case UnityEngine.KeyCode.RightControl: return(Key.Control);

            case UnityEngine.KeyCode.RightAlt: return(Key.Alt);

            case UnityEngine.KeyCode.RightShift: return(Key.Shift);
            }
            return(Key.Invalid);
        }
Ejemplo n.º 10
0
        public void __Gen_Delegate_Imp7(UnityEngine.KeyCode p0)
        {
#if THREAD_SAFE || HOTFIX_ENABLE
            lock (luaEnv.luaEnvLock)
            {
#endif
            RealStatePtr L = luaEnv.rawL;
            int errFunc    = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference);
            ObjectTranslator translator = luaEnv.translator;
            translator.Push(L, p0);

            PCall(L, 1, 0, errFunc);



            LuaAPI.lua_settop(L, errFunc - 1);

#if THREAD_SAFE || HOTFIX_ENABLE
        }
#endif
        }
Ejemplo n.º 11
0
        static StackObject *getKeyCurrentDown_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::FOCUS_MASK @mask = (global::FOCUS_MASK)typeof(global::FOCUS_MASK).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.KeyCode @key = (UnityEngine.KeyCode) typeof(UnityEngine.KeyCode).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = global::FrameBase.getKeyCurrentDown(@key, @mask);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
Ejemplo n.º 12
0
        private void initGamepad(string input, axisType type, float rest)
        {
            this.type  = type;
            this.input = input;
            this.isKey = false;
            this.rest  = rest;

            this.key = KeyCode.None;

            if (this.type == axisType.positiveAxis)
            {
                this.name = $"{this.input} +";
            }
            else if (this.type == axisType.negativeAxis)
            {
                this.name = $"{this.input} -";
            }
            else
            {
                this.name = this.input;
            }
        }
Ejemplo n.º 13
0
        static StackObject *Invoke_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.KeyCode @key = (UnityEngine.KeyCode) typeof(UnityEngine.KeyCode).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.GameObject @go = (UnityEngine.GameObject) typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            global::UIEventListener.KeyCodeDelegate instance_of_this_method = (global::UIEventListener.KeyCodeDelegate) typeof(global::UIEventListener.KeyCodeDelegate).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Invoke(@go, @key);

            return(__ret);
        }
 public static ButtonDelegate CreateButtonDelegate(UnityEngine.KeyCode key)
 {
     return(() => UnityEngine.Input.GetKey(key));
 }
 public static AxisDelegateFactory CreateAxisDelegateFactory(UnityEngine.KeyCode positive, UnityEngine.KeyCode negative)
 {
     return((j) =>
     {
         return CreateAxisDelegate(positive, negative);
     });
 }
Ejemplo n.º 16
0
 public string Desc;                                                             //(To GET data) 1th part is a string,   The description (hoverover text)
 public Keys(string Name, UnityEngine.KeyCode Key_, string Desc)                 //Create a way to add all data at once
 {
     this.Name = Name;                                                           //(To SET data) 1th part is a string,   The name
     this.Key_ = Key_;                                                           //(To SET data) 2nd part is a bool,     The default state
     this.Desc = Desc;                                                           //(To SET data) 3rd part is a string,   The description (hoverover text)
 }
 public static AxisDelegate CreateTriggerDelegate(UnityEngine.KeyCode key)
 {
     return(() => UnityEngine.Input.GetKey(key) ? 1f : 0f);
 }
Ejemplo n.º 18
0
 public KeyMapping(string name, UnityEngine.KeyCode primaryInput, KeyModifier primaryKeyModifier = KeyModifier.NoModifier,
                   UnityEngine.KeyCode?secondaryInput = null, KeyModifier secondaryKeyModifier = KeyModifier.NoModifier,
                   UnityEngine.KeyCode?tertiaryInput  = null, KeyModifier tertiaryKeyModifier  = KeyModifier.NoModifier) :
     this(name, ArgToInput(primaryInput, primaryKeyModifier), ArgToInput(secondaryInput, secondaryKeyModifier), ArgToInput(tertiaryInput, tertiaryKeyModifier))
 {
 }
Ejemplo n.º 19
0
 public KeyAction(string name, UnityEngine.KeyCode primaryKey)
 {
     this.ActionName = name;
     this.PrimaryKey = primaryKey;
 }
Ejemplo n.º 20
0
        private static UnityEngine.InputSystem.Controls.ButtonControl GetButtonControl(KeyCode oldKey)
        {
            if (UnityEngine.InputSystem.Mouse.current != null)
            {
                switch (oldKey)
                {
                case KeyCode.Mouse0: return(UnityEngine.InputSystem.Mouse.current.leftButton);

                case KeyCode.Mouse1: return(UnityEngine.InputSystem.Mouse.current.rightButton);

                case KeyCode.Mouse2: return(UnityEngine.InputSystem.Mouse.current.middleButton);

                case KeyCode.Mouse3: return(UnityEngine.InputSystem.Mouse.current.forwardButton);

                case KeyCode.Mouse4: return(UnityEngine.InputSystem.Mouse.current.backButton);
                }
            }

            if (UnityEngine.InputSystem.Keyboard.current != null)
            {
                var newKey = default(UnityEngine.InputSystem.Key);

                if (keyMapping.TryGetValue(oldKey, out newKey) == true)
                {
                    return(UnityEngine.InputSystem.Keyboard.current[newKey]);
                }
            }

            return(null);
        }
Ejemplo n.º 21
0
        /** constructor
         */
        public Status_Key_Item(Status_Key_Type a_key_type)
        {
            //digital
            this.digital.Reset();

            //key
            switch (a_key_type)
            {
            case Status_Key_Type.A:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.A;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.A;
            } break;

            case Status_Key_Type.B:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.B;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.B;
            } break;

            case Status_Key_Type.C:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.C;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.C;
            } break;

            case Status_Key_Type.D:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.D;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.D;
            } break;

            case Status_Key_Type.E:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.E;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.E;
            } break;

            case Status_Key_Type.F:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F;
            } break;

            case Status_Key_Type.G:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.G;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.G;
            } break;

            case Status_Key_Type.H:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.H;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.H;
            } break;

            case Status_Key_Type.I:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.I;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.I;
            } break;

            case Status_Key_Type.J:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.J;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.J;
            } break;

            case Status_Key_Type.K:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.K;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.K;
            } break;

            case Status_Key_Type.L:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.L;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.L;
            } break;

            case Status_Key_Type.M:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.M;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.M;
            } break;

            case Status_Key_Type.N:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.N;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.N;
            } break;

            case Status_Key_Type.O:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.O;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.O;
            } break;

            case Status_Key_Type.P:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.P;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.P;
            } break;

            case Status_Key_Type.Q:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Q;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Q;
            } break;

            case Status_Key_Type.R:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.R;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.R;
            } break;

            case Status_Key_Type.S:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.S;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.S;
            } break;

            case Status_Key_Type.T:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.T;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.T;
            } break;

            case Status_Key_Type.U:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.U;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.U;
            } break;

            case Status_Key_Type.V:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.V;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.V;
            } break;

            case Status_Key_Type.W:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.W;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.W;
            } break;

            case Status_Key_Type.X:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.X;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.X;
            } break;

            case Status_Key_Type.Y:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Y;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Y;
            } break;

            case Status_Key_Type.Z:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Z;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Z;
            } break;



            case Status_Key_Type.N0:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit0;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha0;
            } break;

            case Status_Key_Type.N1:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit1;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha1;
            } break;

            case Status_Key_Type.N2:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit2;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha2;
            } break;

            case Status_Key_Type.N3:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit3;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha3;
            } break;

            case Status_Key_Type.N4:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit4;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha4;
            } break;

            case Status_Key_Type.N5:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit5;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha5;
            } break;

            case Status_Key_Type.N6:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit6;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha6;
            } break;

            case Status_Key_Type.N7:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit7;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha7;
            } break;

            case Status_Key_Type.N8:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit8;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha8;
            } break;

            case Status_Key_Type.N9:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Digit9;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Alpha9;
            } break;



            case Status_Key_Type.F1:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F1;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F1;
            } break;

            case Status_Key_Type.F2:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F2;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F2;
            } break;

            case Status_Key_Type.F3:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F3;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F3;
            } break;

            case Status_Key_Type.F4:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F4;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F4;
            } break;

            case Status_Key_Type.F5:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F5;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F5;
            } break;

            case Status_Key_Type.F6:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F6;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F6;
            } break;

            case Status_Key_Type.F7:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F7;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F7;
            } break;

            case Status_Key_Type.F8:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F8;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F8;
            } break;

            case Status_Key_Type.F9:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F9;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F9;
            } break;

            case Status_Key_Type.F10:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F10;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F10;
            } break;

            case Status_Key_Type.F11:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F11;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F11;
            } break;

            case Status_Key_Type.F12:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.F12;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.F12;
            } break;



            case Status_Key_Type.P0:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad0;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad0;
            } break;

            case Status_Key_Type.P1:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad1;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad1;
            } break;

            case Status_Key_Type.P2:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad2;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad2;
            } break;

            case Status_Key_Type.P3:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad3;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad3;
            } break;

            case Status_Key_Type.P4:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad4;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad4;
            } break;

            case Status_Key_Type.P5:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad5;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad5;
            } break;

            case Status_Key_Type.P6:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad6;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad6;
            } break;

            case Status_Key_Type.P7:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad7;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad7;
            } break;

            case Status_Key_Type.P8:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad8;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad8;
            } break;

            case Status_Key_Type.P9:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Numpad9;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Keypad9;
            } break;

            case Status_Key_Type.PadEnter:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.NumpadEnter;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.KeypadEnter;
            } break;

            case Status_Key_Type.PadPeriod:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.NumpadPeriod;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.KeypadPeriod;
            } break;

            case Status_Key_Type.PadPlus:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.NumpadPlus;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.KeypadPlus;
            } break;

            case Status_Key_Type.PadMinus:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.NumpadMinus;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.KeypadMinus;
            } break;

            case Status_Key_Type.PadMultiply:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.NumpadMultiply;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.KeypadMultiply;
            } break;

            case Status_Key_Type.PadDivide:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.NumpadDivide;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.KeypadDivide;
            } break;



            case Status_Key_Type.Up:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.UpArrow;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.UpArrow;
            } break;

            case Status_Key_Type.Down:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.DownArrow;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.DownArrow;
            } break;

            case Status_Key_Type.Left:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.LeftArrow;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.LeftArrow;
            } break;

            case Status_Key_Type.Right:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.RightArrow;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.RightArrow;
            } break;



            case Status_Key_Type.Enter:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Enter;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Return;
            } break;

            case Status_Key_Type.Space:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Space;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Space;
            } break;

            case Status_Key_Type.LeftShift:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.LeftShift;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.LeftShift;
            } break;

            case Status_Key_Type.RightShift:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.RightShift;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.RightShift;
            } break;

            case Status_Key_Type.LeftCtrl:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.LeftCtrl;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.LeftControl;
            } break;

            case Status_Key_Type.RightCtrl:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.RightCtrl;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.RightControl;
            } break;

            case Status_Key_Type.LeftAlt:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.LeftAlt;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.LeftAlt;
            } break;

            case Status_Key_Type.RightAlt:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.RightAlt;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.RightAlt;
            } break;

            case Status_Key_Type.Tab:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Tab;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Tab;
            } break;

            case Status_Key_Type.Esc:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Escape;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Escape;
            } break;

            case Status_Key_Type.Backspace:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Backspace;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Backspace;
            } break;

            case Status_Key_Type.Insert:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Insert;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Insert;
            } break;

            case Status_Key_Type.Delete:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Delete;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Delete;
            } break;

            case Status_Key_Type.Home:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Home;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Home;
            } break;

            case Status_Key_Type.End:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.End;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.End;
            } break;

            case Status_Key_Type.PageUp:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.PageUp;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.PageUp;
            } break;

            case Status_Key_Type.PageDown:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.PageDown;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.PageDown;
            } break;

            case Status_Key_Type.Pause:
            {
                                        #if (USE_DEF_FEE_INPUTSYSTEM)
                this.inputsystem_key = UnityEngine.InputSystem.Key.Pause;
                                        #endif
                this.inputmanager_key = UnityEngine.KeyCode.Pause;
            } break;



            default:
            {
                Tool.Assert(false);
            } break;
            }
        }
Ejemplo n.º 22
0
        static internal void Lua_UIEventListener_KeyCodeDelegate(LuaFunction ld, UnityEngine.GameObject a1, UnityEngine.KeyCode a2)
        {
            IntPtr l     = ld.L;
            int    error = pushTry(l);

            pushValue(l, a1);
            pushValue(l, a2);
            ld.pcall(2, error);
            LuaDLL.lua_settop(l, error - 1);
        }
Ejemplo n.º 23
0
        public static Alt.GUI.Keys TranslateKeyCode(UnityEngine.KeyCode key)
        {
            if (m_TranslationKeyCodeDict == null)
            {
                m_TranslationKeyCodeDict = new Dictionary <UnityEngine.KeyCode, Alt.GUI.Keys>();

                //     A key outside the known keys.
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.None, Alt.GUI.Keys.Unknown);

                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Backspace, Alt.GUI.Keys.Backspace);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Delete, Alt.GUI.Keys.Delete);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Tab, Alt.GUI.Keys.Tab);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Clear, Alt.GUI.Keys.Clear);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Return, Alt.GUI.Keys.Return);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Pause, Alt.GUI.Keys.Pause);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Escape, Alt.GUI.Keys.Escape);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Space, Alt.GUI.Keys.Space);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad0, Alt.GUI.Keys.NumPad0);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad1, Alt.GUI.Keys.NumPad1);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad2, Alt.GUI.Keys.NumPad2);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad3, Alt.GUI.Keys.NumPad3);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad4, Alt.GUI.Keys.NumPad4);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad5, Alt.GUI.Keys.NumPad5);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad6, Alt.GUI.Keys.NumPad6);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad7, Alt.GUI.Keys.NumPad7);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad8, Alt.GUI.Keys.NumPad8);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Keypad9, Alt.GUI.Keys.NumPad9);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.KeypadPeriod, Alt.GUI.Keys.OemPeriod);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.KeypadDivide, Alt.GUI.Keys.OemBackslash);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.KeypadMultiply, Alt.GUI.Keys.Multiply);                //???
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.KeypadMinus, Alt.GUI.Keys.OemMinus);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.KeypadPlus, Alt.GUI.Keys.OemPlus);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.KeypadEnter, Alt.GUI.Keys.Enter);                //???
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.KeypadEquals, Alt.GUI.Keys.);//???
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.UpArrow, Alt.GUI.Keys.Up);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.DownArrow, Alt.GUI.Keys.Down);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightArrow, Alt.GUI.Keys.Right);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftArrow, Alt.GUI.Keys.Left);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Insert, Alt.GUI.Keys.Insert);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Home, Alt.GUI.Keys.Home);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.End, Alt.GUI.Keys.End);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.PageUp, Alt.GUI.Keys.PageUp);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.PageDown, Alt.GUI.Keys.PageDown);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F1, Alt.GUI.Keys.F1);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F2, Alt.GUI.Keys.F2);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F3, Alt.GUI.Keys.F3);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F4, Alt.GUI.Keys.F4);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F5, Alt.GUI.Keys.F5);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F6, Alt.GUI.Keys.F6);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F7, Alt.GUI.Keys.F7);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F8, Alt.GUI.Keys.F8);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F9, Alt.GUI.Keys.F9);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F10, Alt.GUI.Keys.F10);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F11, Alt.GUI.Keys.F11);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F12, Alt.GUI.Keys.F12);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F13, Alt.GUI.Keys.F13);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F14, Alt.GUI.Keys.F14);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F15, Alt.GUI.Keys.F15);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha0, Alt.GUI.Keys.D0);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha1, Alt.GUI.Keys.D1);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha2, Alt.GUI.Keys.D2);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha3, Alt.GUI.Keys.D3);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha4, Alt.GUI.Keys.D4);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha5, Alt.GUI.Keys.D5);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha6, Alt.GUI.Keys.D6);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha7, Alt.GUI.Keys.D7);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha8, Alt.GUI.Keys.D8);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Alpha9, Alt.GUI.Keys.D9);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Exclaim, Alt.GUI.Keys.);//"!"
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.DoubleQuote, Alt.GUI.Keys.Quotes);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Hash, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Dollar, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Ampersand, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Quote, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftParen, Alt.GUI.Keys.OpenBracket);                //???
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightParen, Alt.GUI.Keys.CloseBracket);              //???
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Asterisk, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Plus, Alt.GUI.Keys.Plus);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Comma, Alt.GUI.Keys.Comma);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Minus, Alt.GUI.Keys.OemMinus);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Period, Alt.GUI.Keys.Period);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Slash, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Colon, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Semicolon, Alt.GUI.Keys.Semicolon);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Less, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Equals, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Greater, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Question, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.At, Alt.GUI.Keys.Attn);                //???
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftBracket, Alt.GUI.Keys.OpenBracket);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Backslash, Alt.GUI.Keys.Backslash);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightBracket, Alt.GUI.Keys.CloseBracket);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Caret, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Underscore, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.BackQuote, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.A, Alt.GUI.Keys.A);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.B, Alt.GUI.Keys.B);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.C, Alt.GUI.Keys.C);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.D, Alt.GUI.Keys.D);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.E, Alt.GUI.Keys.E);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.F, Alt.GUI.Keys.F);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.G, Alt.GUI.Keys.G);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.H, Alt.GUI.Keys.H);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.I, Alt.GUI.Keys.I);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.J, Alt.GUI.Keys.J);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.K, Alt.GUI.Keys.K);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.L, Alt.GUI.Keys.L);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.M, Alt.GUI.Keys.M);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.N, Alt.GUI.Keys.N);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.O, Alt.GUI.Keys.O);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.P, Alt.GUI.Keys.P);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Q, Alt.GUI.Keys.Q);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.R, Alt.GUI.Keys.R);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.S, Alt.GUI.Keys.S);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.T, Alt.GUI.Keys.T);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.U, Alt.GUI.Keys.U);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.V, Alt.GUI.Keys.V);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.W, Alt.GUI.Keys.W);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.X, Alt.GUI.Keys.X);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Y, Alt.GUI.Keys.Y);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Z, Alt.GUI.Keys.Z);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Numlock, Alt.GUI.Keys.NumLock);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.CapsLock, Alt.GUI.Keys.CapsLock);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.ScrollLock, Alt.GUI.Keys.ScrollLock);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightShift, Alt.GUI.Keys.RightShift);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftShift, Alt.GUI.Keys.LeftShift);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightControl, Alt.GUI.Keys.RightControl);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftControl, Alt.GUI.Keys.LeftControl);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightAlt, Alt.GUI.Keys.RightAlt);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftAlt, Alt.GUI.Keys.LeftAlt);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftCommand, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftApple, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.LeftWindows, Alt.GUI.Keys.LWin);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightCommand, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightApple, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.RightWindows, Alt.GUI.Keys.RWin);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.AltGr, Alt.GUI.Keys.Alt);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Help, Alt.GUI.Keys.Help);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Print, Alt.GUI.Keys.Print);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.SysReq, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Break, Alt.GUI.Keys.);
                m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Menu, Alt.GUI.Keys.Menu);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Mouse0, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Mouse1, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Mouse2, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Mouse3, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Mouse4, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Mouse5, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Mouse6, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton0, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton1, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton2, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton3, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton4, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton5, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton6, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton7, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton8, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton9, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton10, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton11, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton12, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton13, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton14, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton15, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton16, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton17, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton18, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.JoystickButton19, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button0, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button1, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button2, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button3, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button4, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button5, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button6, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button7, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button8, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button9, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button10, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button11, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button12, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button13, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button14, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button15, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button16, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button17, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button18, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick1Button19, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button0, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button1, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button2, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button3, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button4, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button5, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button6, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button7, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button8, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button9, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button10, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button11, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button12, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button13, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button14, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button15, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button16, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button17, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button18, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick2Button19, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button0, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button1, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button2, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button3, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button4, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button5, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button6, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button7, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button8, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button9, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button10, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button11, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button12, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button13, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button14, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button15, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button16, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button17, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button18, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick3Button19, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button0, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button1, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button2, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button3, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button4, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button5, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button6, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button7, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button8, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button9, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button10, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button11, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button12, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button13, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button14, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button15, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button16, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button17, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button18, Alt.GUI.Keys.);
                //m_TranslationKeyCodeDict.Add(UnityEngine.KeyCode.Joystick4Button19, Alt.GUI.Keys.);
            }

            Alt.GUI.Keys keys;
            if (m_TranslationKeyCodeDict.TryGetValue(key, out keys))
            {
                return(keys);
            }

            return((Alt.GUI.Keys)key);
        }
Ejemplo n.º 24
0
 /// <summary>
 /// Creates and returns a button, mapped to the specified key code.
 /// Useful for mapping it in input axes.
 /// </summary>
 /// <param name="key">UnityEngine.KeyCode</param>
 /// <returns>New Button object.</returns>
 public static Button CreateButtonFromKeycode(UnityEngine.KeyCode key)
 {
     return(new Key(key));
 }
Ejemplo n.º 25
0
 public Configuration()
 {
     VerticalKey = UnityEngine.KeyCode.LeftShift;
 }
 static void Push(IntPtr L, UnityEngine.KeyCode arg)
 {
     ToLua.Push(L, arg);
 }
 public static AxisDelegateFactory CreateTriggerDelegateFactory(UnityEngine.KeyCode key)
 {
     return((j) => CreateTriggerDelegate(key));
 }
        private System.Collections.IEnumerator WorkRoutine(float delay)
        {
            yield return(WaitForDuration.Seconds(delay, SPTime.Real));

            SPInputId positiveBtn = SPInputId.Unknown;

            UnityEngine.KeyCode positiveKey = UnityEngine.KeyCode.None;
            float t = float.NegativeInfinity;

            while (_state == State.Running)
            {
                if (UnityEngine.Input.GetKeyDown(this.CancelKey))
                {
                    this.Cancel();
                    yield break;
                }
                if (this.CancelDelegate != null && this.CancelDelegate())
                {
                    this.Cancel();
                    yield break;
                }

                if (this.CustomPollingCallback != null)
                {
                    InputToken token;
                    if (this.CustomPollingCallback(this, out token))
                    {
                        this.InputResult = token;
                        goto Complete;
                    }
                }

                if (this.PollFromStandardSPInputs)
                {
                    if (this.PollJoyAxes || this.PollMouseAxes)
                    {
                        SPInputId axis;
                        float     value;
                        if (SPInputDirect.TryPollAxis(out axis, out value, this.Joystick, this.PollMouseAxes, this.AxisPollingDeadZone) && TestConsideration(value, this.AxisConsideration, this.AxisPollingDeadZone))
                        {
                            if ((this.PollJoyAxes && axis.IsJoyAxis()) || (this.PollMouseAxes && axis.IsMouseAxis()))
                            {
                                if (this.PollAsTrigger)
                                {
                                    this.InputResult = InputToken.CreateTrigger(axis);
                                }
                                else
                                {
                                    this.InputResult = InputToken.CreateAxis(axis, value < 0f);
                                }
                                goto Complete;
                            }
                        }
                    }

                    if (this.PollButtons)
                    {
                        SPInputId btn;
                        if (SPInputDirect.TryPollButton(out btn, this.ButtonPollingState, this.Joystick))
                        {
                            if (this.PollAsTrigger)
                            {
                                this.InputResult = InputToken.CreateTrigger(btn, AxleValueConsideration.Positive);
                                goto Complete;
                            }
                            if (positiveBtn != SPInputId.Unknown)
                            {
                                this.InputResult = InputToken.CreateEmulatedAxis(positiveBtn, btn);
                                goto Complete;
                            }
                            else
                            {
                                positiveKey = UnityEngine.KeyCode.None;
                                positiveBtn = btn;
                                t           = UnityEngine.Time.realtimeSinceStartup;
                                goto Restart;
                            }
                        }
                    }
                }

                if (this.PollKeyboard)
                {
                    UnityEngine.KeyCode key;
                    if (SPInputDirect.TryPollKey(out key, this.ButtonPollingState))
                    {
                        if (this.PollAsTrigger)
                        {
                            this.InputResult = InputToken.CreateTrigger(key);
                            goto Complete;
                        }
                        if (positiveKey != UnityEngine.KeyCode.None)
                        {
                            this.InputResult = InputToken.CreateEmulatedAxis(positiveKey, key);
                            goto Complete;
                        }
                        else
                        {
                            positiveBtn = SPInputId.Unknown;
                            positiveKey = key;
                            t           = UnityEngine.Time.realtimeSinceStartup;
                            goto Restart;
                        }
                    }
                }

Restart:
                yield return(null);

                if (UnityEngine.Time.realtimeSinceStartup - t > this.ButtonPressMonitorDuration)
                {
                    positiveBtn = SPInputId.Unknown;
                    positiveKey = UnityEngine.KeyCode.None;
                }
            }

Complete:
            _state   = State.Complete;
            _routine = null;
            this.SignalOnComplete();
        }
Ejemplo n.º 29
0
        static Key ConvertKeycode(UnityEngine.KeyCode inputCode)
        {
            switch (inputCode)
            {
            case UnityEngine.KeyCode.None:
                return(Key.K_UNKNOWN);

            case UnityEngine.KeyCode.Backspace:
                return(Key.K_BACKSPACE);

            case UnityEngine.KeyCode.Delete:
                return(Key.K_DELETE);

            case UnityEngine.KeyCode.Tab:
                return(Key.K_TAB);

            case UnityEngine.KeyCode.Clear:
                return(Key.K_UNKNOWN);

            case UnityEngine.KeyCode.Return:
                return(Key.K_RETURN);

            case UnityEngine.KeyCode.Pause:
                return(Key.K_PAUSE);

            case UnityEngine.KeyCode.Escape:
                return(Key.K_ESCAPE);

            case UnityEngine.KeyCode.Space:
                return(Key.K_SPACE);

            case UnityEngine.KeyCode.Keypad0:
                return(Key.K_KP0);

            case UnityEngine.KeyCode.Keypad1:
                return(Key.K_KP1);

            case UnityEngine.KeyCode.Keypad2:
                return(Key.K_KP2);

            case UnityEngine.KeyCode.Keypad3:
                return(Key.K_KP3);

            case UnityEngine.KeyCode.Keypad4:
                return(Key.K_KP4);

            case UnityEngine.KeyCode.Keypad5:
                return(Key.K_KP5);

            case UnityEngine.KeyCode.Keypad6:
                return(Key.K_KP6);

            case UnityEngine.KeyCode.Keypad7:
                return(Key.K_KP7);

            case UnityEngine.KeyCode.Keypad8:
                return(Key.K_KP8);

            case UnityEngine.KeyCode.Keypad9:
                return(Key.K_KP9);

            case UnityEngine.KeyCode.KeypadPeriod:
                return(Key.K_KP_PERIOD);

            case UnityEngine.KeyCode.KeypadDivide:
                return(Key.K_KP_DIVIDE);

            case UnityEngine.KeyCode.KeypadMultiply:
                return(Key.K_KP_MULTIPLY);

            case UnityEngine.KeyCode.KeypadMinus:
                return(Key.K_KP_MINUS);

            case UnityEngine.KeyCode.KeypadPlus:
                return(Key.K_KP_PLUS);

            case UnityEngine.KeyCode.KeypadEnter:
                return(Key.K_KP_ENTER);

            case UnityEngine.KeyCode.KeypadEquals:
                return(Key.K_KP_EQUALS);

            case UnityEngine.KeyCode.UpArrow:
                return(Key.K_UP);

            case UnityEngine.KeyCode.DownArrow:
                return(Key.K_DOWN);

            case UnityEngine.KeyCode.RightArrow:
                return(Key.K_RIGHT);

            case UnityEngine.KeyCode.LeftArrow:
                return(Key.K_LEFT);

            case UnityEngine.KeyCode.Insert:
                return(Key.K_INSERT);

            case UnityEngine.KeyCode.Home:
                return(Key.K_HOME);

            case UnityEngine.KeyCode.End:
                return(Key.K_END);

            case UnityEngine.KeyCode.PageUp:
                return(Key.K_PAGEUP);

            case UnityEngine.KeyCode.PageDown:
                return(Key.K_PAGEDOWN);

            case UnityEngine.KeyCode.F1:
                return(Key.K_F1);

            case UnityEngine.KeyCode.F2:
                return(Key.K_F2);

            case UnityEngine.KeyCode.F3:
                return(Key.K_F3);

            case UnityEngine.KeyCode.F4:
                return(Key.K_F4);

            case UnityEngine.KeyCode.F5:
                return(Key.K_F5);

            case UnityEngine.KeyCode.F6:
                return(Key.K_F6);

            case UnityEngine.KeyCode.F7:
                return(Key.K_F7);

            case UnityEngine.KeyCode.F8:
                return(Key.K_F8);

            case UnityEngine.KeyCode.F9:
                return(Key.K_F9);

            case UnityEngine.KeyCode.F10:
                return(Key.K_F10);

            case UnityEngine.KeyCode.F11:
                return(Key.K_F11);

            case UnityEngine.KeyCode.F12:
                return(Key.K_F12);

            case UnityEngine.KeyCode.F13:
                return(Key.K_F13);

            case UnityEngine.KeyCode.F14:
                return(Key.K_F14);

            case UnityEngine.KeyCode.F15:
                return(Key.K_F15);

            case UnityEngine.KeyCode.Alpha0:
                return(Key.K_0);

            case UnityEngine.KeyCode.Alpha1:
                return(Key.K_1);

            case UnityEngine.KeyCode.Alpha2:
                break;

            case UnityEngine.KeyCode.Alpha3:
                break;

            case UnityEngine.KeyCode.Alpha4:
                break;

            case UnityEngine.KeyCode.Alpha5:
                break;

            case UnityEngine.KeyCode.Alpha6:
                break;

            case UnityEngine.KeyCode.Alpha7:
                break;

            case UnityEngine.KeyCode.Alpha8:
                break;

            case UnityEngine.KeyCode.Alpha9:
                break;

            case UnityEngine.KeyCode.Exclaim:
                break;

            case UnityEngine.KeyCode.DoubleQuote:
                break;

            case UnityEngine.KeyCode.Hash:
                break;

            case UnityEngine.KeyCode.Dollar:
                break;

            case UnityEngine.KeyCode.Ampersand:
                break;

            case UnityEngine.KeyCode.Quote:
                break;

            case UnityEngine.KeyCode.LeftParen:
                break;

            case UnityEngine.KeyCode.RightParen:
                break;

            case UnityEngine.KeyCode.Asterisk:
                break;

            case UnityEngine.KeyCode.Plus:
                break;

            case UnityEngine.KeyCode.Comma:
                break;

            case UnityEngine.KeyCode.Minus:
                break;

            case UnityEngine.KeyCode.Period:
                break;

            case UnityEngine.KeyCode.Slash:
                break;

            case UnityEngine.KeyCode.Colon:
                break;

            case UnityEngine.KeyCode.Semicolon:
                break;

            case UnityEngine.KeyCode.Less:
                break;

            case UnityEngine.KeyCode.Equals:
                break;

            case UnityEngine.KeyCode.Greater:
                break;

            case UnityEngine.KeyCode.Question:
                break;

            case UnityEngine.KeyCode.At:
                break;

            case UnityEngine.KeyCode.LeftBracket:
                break;

            case UnityEngine.KeyCode.Backslash:
                break;

            case UnityEngine.KeyCode.RightBracket:
                break;

            case UnityEngine.KeyCode.Caret:
                break;

            case UnityEngine.KeyCode.Underscore:
                break;

            case UnityEngine.KeyCode.BackQuote:
                break;

            case UnityEngine.KeyCode.A:
                break;

            case UnityEngine.KeyCode.B:
                break;

            case UnityEngine.KeyCode.C:
                break;

            case UnityEngine.KeyCode.D:
                break;

            case UnityEngine.KeyCode.E:
                break;

            case UnityEngine.KeyCode.F:
                break;

            case UnityEngine.KeyCode.G:
                break;

            case UnityEngine.KeyCode.H:
                break;

            case UnityEngine.KeyCode.I:
                break;

            case UnityEngine.KeyCode.J:
                break;

            case UnityEngine.KeyCode.K:
                break;

            case UnityEngine.KeyCode.L:
                break;

            case UnityEngine.KeyCode.M:
                break;

            case UnityEngine.KeyCode.N:
                break;

            case UnityEngine.KeyCode.O:
                break;

            case UnityEngine.KeyCode.P:
                break;

            case UnityEngine.KeyCode.Q:
                break;

            case UnityEngine.KeyCode.R:
                break;

            case UnityEngine.KeyCode.S:
                break;

            case UnityEngine.KeyCode.T:
                break;

            case UnityEngine.KeyCode.U:
                break;

            case UnityEngine.KeyCode.V:
                break;

            case UnityEngine.KeyCode.W:
                break;

            case UnityEngine.KeyCode.X:
                break;

            case UnityEngine.KeyCode.Y:
                break;

            case UnityEngine.KeyCode.Z:
                break;

            case UnityEngine.KeyCode.Numlock:
                break;

            case UnityEngine.KeyCode.CapsLock:
                break;

            case UnityEngine.KeyCode.ScrollLock:
                break;

            case UnityEngine.KeyCode.RightShift:
                break;

            case UnityEngine.KeyCode.LeftShift:
                break;

            case UnityEngine.KeyCode.RightControl:
                break;

            case UnityEngine.KeyCode.LeftControl:
                break;

            case UnityEngine.KeyCode.RightAlt:
                break;

            case UnityEngine.KeyCode.LeftAlt:
                break;

            case UnityEngine.KeyCode.LeftCommand:
                break;

            case UnityEngine.KeyCode.LeftWindows:
                break;

            case UnityEngine.KeyCode.RightCommand:
                break;

            case UnityEngine.KeyCode.RightWindows:
                break;

            case UnityEngine.KeyCode.AltGr:
                break;

            case UnityEngine.KeyCode.Help:
                break;

            case UnityEngine.KeyCode.Print:
                break;

            case UnityEngine.KeyCode.SysReq:
                break;

            case UnityEngine.KeyCode.Break:
                break;

            case UnityEngine.KeyCode.Menu:
                break;

            case UnityEngine.KeyCode.Mouse0:
                break;

            case UnityEngine.KeyCode.Mouse1:
                break;

            case UnityEngine.KeyCode.Mouse2:
                break;

            case UnityEngine.KeyCode.Mouse3:
                break;

            case UnityEngine.KeyCode.Mouse4:
                break;

            case UnityEngine.KeyCode.Mouse5:
                break;

            case UnityEngine.KeyCode.Mouse6:
                break;

            case UnityEngine.KeyCode.JoystickButton0:
                break;

            case UnityEngine.KeyCode.JoystickButton1:
                break;

            case UnityEngine.KeyCode.JoystickButton2:
                break;

            case UnityEngine.KeyCode.JoystickButton3:
                break;

            case UnityEngine.KeyCode.JoystickButton4:
                break;

            case UnityEngine.KeyCode.JoystickButton5:
                break;

            case UnityEngine.KeyCode.JoystickButton6:
                break;

            case UnityEngine.KeyCode.JoystickButton7:
                break;

            case UnityEngine.KeyCode.JoystickButton8:
                break;

            case UnityEngine.KeyCode.JoystickButton9:
                break;

            case UnityEngine.KeyCode.JoystickButton10:
                break;

            case UnityEngine.KeyCode.JoystickButton11:
                break;

            case UnityEngine.KeyCode.JoystickButton12:
                break;

            case UnityEngine.KeyCode.JoystickButton13:
                break;

            case UnityEngine.KeyCode.JoystickButton14:
                break;

            case UnityEngine.KeyCode.JoystickButton15:
                break;

            case UnityEngine.KeyCode.JoystickButton16:
                break;

            case UnityEngine.KeyCode.JoystickButton17:
                break;

            case UnityEngine.KeyCode.JoystickButton18:
                break;

            case UnityEngine.KeyCode.JoystickButton19:
                break;

            case UnityEngine.KeyCode.Joystick1Button0:
                break;

            case UnityEngine.KeyCode.Joystick1Button1:
                break;

            case UnityEngine.KeyCode.Joystick1Button2:
                break;

            case UnityEngine.KeyCode.Joystick1Button3:
                break;

            case UnityEngine.KeyCode.Joystick1Button4:
                break;

            case UnityEngine.KeyCode.Joystick1Button5:
                break;

            case UnityEngine.KeyCode.Joystick1Button6:
                break;

            case UnityEngine.KeyCode.Joystick1Button7:
                break;

            case UnityEngine.KeyCode.Joystick1Button8:
                break;

            case UnityEngine.KeyCode.Joystick1Button9:
                break;

            case UnityEngine.KeyCode.Joystick1Button10:
                break;

            case UnityEngine.KeyCode.Joystick1Button11:
                break;

            case UnityEngine.KeyCode.Joystick1Button12:
                break;

            case UnityEngine.KeyCode.Joystick1Button13:
                break;

            case UnityEngine.KeyCode.Joystick1Button14:
                break;

            case UnityEngine.KeyCode.Joystick1Button15:
                break;

            case UnityEngine.KeyCode.Joystick1Button16:
                break;

            case UnityEngine.KeyCode.Joystick1Button17:
                break;

            case UnityEngine.KeyCode.Joystick1Button18:
                break;

            case UnityEngine.KeyCode.Joystick1Button19:
                break;

            case UnityEngine.KeyCode.Joystick2Button0:
                break;

            case UnityEngine.KeyCode.Joystick2Button1:
                break;

            case UnityEngine.KeyCode.Joystick2Button2:
                break;

            case UnityEngine.KeyCode.Joystick2Button3:
                break;

            case UnityEngine.KeyCode.Joystick2Button4:
                break;

            case UnityEngine.KeyCode.Joystick2Button5:
                break;

            case UnityEngine.KeyCode.Joystick2Button6:
                break;

            case UnityEngine.KeyCode.Joystick2Button7:
                break;

            case UnityEngine.KeyCode.Joystick2Button8:
                break;

            case UnityEngine.KeyCode.Joystick2Button9:
                break;

            case UnityEngine.KeyCode.Joystick2Button10:
                break;

            case UnityEngine.KeyCode.Joystick2Button11:
                break;

            case UnityEngine.KeyCode.Joystick2Button12:
                break;

            case UnityEngine.KeyCode.Joystick2Button13:
                break;

            case UnityEngine.KeyCode.Joystick2Button14:
                break;

            case UnityEngine.KeyCode.Joystick2Button15:
                break;

            case UnityEngine.KeyCode.Joystick2Button16:
                break;

            case UnityEngine.KeyCode.Joystick2Button17:
                break;

            case UnityEngine.KeyCode.Joystick2Button18:
                break;

            case UnityEngine.KeyCode.Joystick2Button19:
                break;

            case UnityEngine.KeyCode.Joystick3Button0:
                break;

            case UnityEngine.KeyCode.Joystick3Button1:
                break;

            case UnityEngine.KeyCode.Joystick3Button2:
                break;

            case UnityEngine.KeyCode.Joystick3Button3:
                break;

            case UnityEngine.KeyCode.Joystick3Button4:
                break;

            case UnityEngine.KeyCode.Joystick3Button5:
                break;

            case UnityEngine.KeyCode.Joystick3Button6:
                break;

            case UnityEngine.KeyCode.Joystick3Button7:
                break;

            case UnityEngine.KeyCode.Joystick3Button8:
                break;

            case UnityEngine.KeyCode.Joystick3Button9:
                break;

            case UnityEngine.KeyCode.Joystick3Button10:
                break;

            case UnityEngine.KeyCode.Joystick3Button11:
                break;

            case UnityEngine.KeyCode.Joystick3Button12:
                break;

            case UnityEngine.KeyCode.Joystick3Button13:
                break;

            case UnityEngine.KeyCode.Joystick3Button14:
                break;

            case UnityEngine.KeyCode.Joystick3Button15:
                break;

            case UnityEngine.KeyCode.Joystick3Button16:
                break;

            case UnityEngine.KeyCode.Joystick3Button17:
                break;

            case UnityEngine.KeyCode.Joystick3Button18:
                break;

            case UnityEngine.KeyCode.Joystick3Button19:
                break;

            case UnityEngine.KeyCode.Joystick4Button0:
                break;

            case UnityEngine.KeyCode.Joystick4Button1:
                break;

            case UnityEngine.KeyCode.Joystick4Button2:
                break;

            case UnityEngine.KeyCode.Joystick4Button3:
                break;

            case UnityEngine.KeyCode.Joystick4Button4:
                break;

            case UnityEngine.KeyCode.Joystick4Button5:
                break;

            case UnityEngine.KeyCode.Joystick4Button6:
                break;

            case UnityEngine.KeyCode.Joystick4Button7:
                break;

            case UnityEngine.KeyCode.Joystick4Button8:
                break;

            case UnityEngine.KeyCode.Joystick4Button9:
                break;

            case UnityEngine.KeyCode.Joystick4Button10:
                break;

            case UnityEngine.KeyCode.Joystick4Button11:
                break;

            case UnityEngine.KeyCode.Joystick4Button12:
                break;

            case UnityEngine.KeyCode.Joystick4Button13:
                break;

            case UnityEngine.KeyCode.Joystick4Button14:
                break;

            case UnityEngine.KeyCode.Joystick4Button15:
                break;

            case UnityEngine.KeyCode.Joystick4Button16:
                break;

            case UnityEngine.KeyCode.Joystick4Button17:
                break;

            case UnityEngine.KeyCode.Joystick4Button18:
                break;

            case UnityEngine.KeyCode.Joystick4Button19:
                break;

            case UnityEngine.KeyCode.Joystick5Button0:
                break;

            case UnityEngine.KeyCode.Joystick5Button1:
                break;

            case UnityEngine.KeyCode.Joystick5Button2:
                break;

            case UnityEngine.KeyCode.Joystick5Button3:
                break;

            case UnityEngine.KeyCode.Joystick5Button4:
                break;

            case UnityEngine.KeyCode.Joystick5Button5:
                break;

            case UnityEngine.KeyCode.Joystick5Button6:
                break;

            case UnityEngine.KeyCode.Joystick5Button7:
                break;

            case UnityEngine.KeyCode.Joystick5Button8:
                break;

            case UnityEngine.KeyCode.Joystick5Button9:
                break;

            case UnityEngine.KeyCode.Joystick5Button10:
                break;

            case UnityEngine.KeyCode.Joystick5Button11:
                break;

            case UnityEngine.KeyCode.Joystick5Button12:
                break;

            case UnityEngine.KeyCode.Joystick5Button13:
                break;

            case UnityEngine.KeyCode.Joystick5Button14:
                break;

            case UnityEngine.KeyCode.Joystick5Button15:
                break;

            case UnityEngine.KeyCode.Joystick5Button16:
                break;

            case UnityEngine.KeyCode.Joystick5Button17:
                break;

            case UnityEngine.KeyCode.Joystick5Button18:
                break;

            case UnityEngine.KeyCode.Joystick5Button19:
                break;

            case UnityEngine.KeyCode.Joystick6Button0:
                break;

            case UnityEngine.KeyCode.Joystick6Button1:
                break;

            case UnityEngine.KeyCode.Joystick6Button2:
                break;

            case UnityEngine.KeyCode.Joystick6Button3:
                break;

            case UnityEngine.KeyCode.Joystick6Button4:
                break;

            case UnityEngine.KeyCode.Joystick6Button5:
                break;

            case UnityEngine.KeyCode.Joystick6Button6:
                break;

            case UnityEngine.KeyCode.Joystick6Button7:
                break;

            case UnityEngine.KeyCode.Joystick6Button8:
                break;

            case UnityEngine.KeyCode.Joystick6Button9:
                break;

            case UnityEngine.KeyCode.Joystick6Button10:
                break;

            case UnityEngine.KeyCode.Joystick6Button11:
                break;

            case UnityEngine.KeyCode.Joystick6Button12:
                break;

            case UnityEngine.KeyCode.Joystick6Button13:
                break;

            case UnityEngine.KeyCode.Joystick6Button14:
                break;

            case UnityEngine.KeyCode.Joystick6Button15:
                break;

            case UnityEngine.KeyCode.Joystick6Button16:
                break;

            case UnityEngine.KeyCode.Joystick6Button17:
                break;

            case UnityEngine.KeyCode.Joystick6Button18:
                break;

            case UnityEngine.KeyCode.Joystick6Button19:
                break;

            case UnityEngine.KeyCode.Joystick7Button0:
                break;

            case UnityEngine.KeyCode.Joystick7Button1:
                break;

            case UnityEngine.KeyCode.Joystick7Button2:
                break;

            case UnityEngine.KeyCode.Joystick7Button3:
                break;

            case UnityEngine.KeyCode.Joystick7Button4:
                break;

            case UnityEngine.KeyCode.Joystick7Button5:
                break;

            case UnityEngine.KeyCode.Joystick7Button6:
                break;

            case UnityEngine.KeyCode.Joystick7Button7:
                break;

            case UnityEngine.KeyCode.Joystick7Button8:
                break;

            case UnityEngine.KeyCode.Joystick7Button9:
                break;

            case UnityEngine.KeyCode.Joystick7Button10:
                break;

            case UnityEngine.KeyCode.Joystick7Button11:
                break;

            case UnityEngine.KeyCode.Joystick7Button12:
                break;

            case UnityEngine.KeyCode.Joystick7Button13:
                break;

            case UnityEngine.KeyCode.Joystick7Button14:
                break;

            case UnityEngine.KeyCode.Joystick7Button15:
                break;

            case UnityEngine.KeyCode.Joystick7Button16:
                break;

            case UnityEngine.KeyCode.Joystick7Button17:
                break;

            case UnityEngine.KeyCode.Joystick7Button18:
                break;

            case UnityEngine.KeyCode.Joystick7Button19:
                break;

            case UnityEngine.KeyCode.Joystick8Button0:
                break;

            case UnityEngine.KeyCode.Joystick8Button1:
                break;

            case UnityEngine.KeyCode.Joystick8Button2:
                break;

            case UnityEngine.KeyCode.Joystick8Button3:
                break;

            case UnityEngine.KeyCode.Joystick8Button4:
                break;

            case UnityEngine.KeyCode.Joystick8Button5:
                break;

            case UnityEngine.KeyCode.Joystick8Button6:
                break;

            case UnityEngine.KeyCode.Joystick8Button7:
                break;

            case UnityEngine.KeyCode.Joystick8Button8:
                break;

            case UnityEngine.KeyCode.Joystick8Button9:
                break;

            case UnityEngine.KeyCode.Joystick8Button10:
                break;

            case UnityEngine.KeyCode.Joystick8Button11:
                break;

            case UnityEngine.KeyCode.Joystick8Button12:
                break;

            case UnityEngine.KeyCode.Joystick8Button13:
                break;

            case UnityEngine.KeyCode.Joystick8Button14:
                break;

            case UnityEngine.KeyCode.Joystick8Button15:
                break;

            case UnityEngine.KeyCode.Joystick8Button16:
                break;

            case UnityEngine.KeyCode.Joystick8Button17:
                break;

            case UnityEngine.KeyCode.Joystick8Button18:
                break;

            case UnityEngine.KeyCode.Joystick8Button19:
                break;

            default:
                return(Key.K_UNKNOWN);
            }
            return(Key.K_UNKNOWN);
        }
Ejemplo n.º 30
0
 public string Description;                                                      //(To GET data) 1th part is a string,   The description (hoverover text)
 public KeyBinding(string name, UnityEngine.KeyCode keyCode, string description) //Create a way to add all data at once
 {
     Name        = name;                                                         //(To SET data) 1th part is a string,   The name
     KeyCode     = keyCode;                                                      //(To SET data) 2nd part is a bool,     The default state
     Description = description;                                                  //(To SET data) 3rd part is a string,   The description (hoverover text)
 }
Ejemplo n.º 31
0
 public static Noesis.Key Convert(UnityEngine.KeyCode key)
 {
     Noesis.Key noesisKey = Noesis.Key.None;
     _unityToNoesis.TryGetValue(key, out noesisKey);
     return(noesisKey);
 }
Ejemplo n.º 32
0
 public void set(UnityEngine.KeyCode primaryInput, UnityEngine.KeyCode?secondaryInput = null, UnityEngine.KeyCode?tertiaryInput = null)
 {
     set(ArgToInput(primaryInput), ArgToInput(secondaryInput), ArgToInput(tertiaryInput));
 }