示例#1
0
        public static Vector2 GetAxis2(ControllerInputType userType)
        {
            if (userType == ControllerInputType.ControllerCPU)
            {
                return(Vector2.zero);
            }
            string str_input_h = userType.ToShortCutInput() + "Horizontal2";
            string str_input_v = userType.ToShortCutInput() + "Vertical2";
            float  h           = Input.GetAxis(str_input_h);
            float  v           = Input.GetAxis(str_input_v);

            return(new Vector2(h, v));
        }
示例#2
0
        public static float GetAxisVertical1(ControllerInputType userType)
        {
            if (userType == ControllerInputType.ControllerCPU)
            {
                return(0);
            }
            string str_input_v = userType.ToShortCutInput() + "Vertical1";

            return(Input.GetAxis(str_input_v));
        }
示例#3
0
        public static bool GetButtonUp(ControllerInputType userType, ButtomInputType bt)
        {
            if (userType == ControllerInputType.ControllerCPU)
            {
                return(false);
            }
            string str_input = userType.ToShortCutInput() + bt.ToString();

            return(Input.GetButtonUp(str_input));
        }
示例#4
0
        public static bool GetButtonDown(ControllerInputType userType, string bt)
        {
            if (userType == ControllerInputType.ControllerCPU)
            {
                return(false);
            }
            string str_input = userType.ToShortCutInput() + bt;

            return(Input.GetButtonDown(str_input));
        }
示例#5
0
        public static float GetAxisHorizontal2(ControllerInputType userType)
        {
            if (userType == ControllerInputType.ControllerCPU)
            {
                return(0);
            }
            string str_input_h = userType.ToShortCutInput() + "Horizontal2";

            return(Input.GetAxis(str_input_h));
        }