示例#1
0
        public static bool GetMouseButton(string button_name)
        {
            VoxieCaptureVolume vcv = FindObjectOfType(typeof(VoxieCaptureVolume)) as VoxieCaptureVolume;
            int A            = (int)InputController.Instance.GetMouseButton(button_name);
            int button_state = vcv.GetMouse().bstat & A;

            return(button_state != 0);
        }
示例#2
0
        public static bool GetMouseButtonDown(string button_name)
        {
            VoxieCaptureVolume vcv = FindObjectOfType(typeof(VoxieCaptureVolume)) as VoxieCaptureVolume;
            int A                = (int)InputController.Instance.GetMouseButton(button_name);
            int button_state     = vcv.GetMouse().bstat & A;
            int old_button_state = vcv.GetMouse().obstat & A;

            if (old_button_state == 0 & button_state != 0)
            {
                vcv.SetMouseSeen(A);
                return(true);
            }
            else
            {
                return(false);
            }
        }