Пример #1
0
        public static bool GetButtonDown(string button_name, int player)
        {
            VoxieCaptureVolume vcv = FindObjectOfType(typeof(VoxieCaptureVolume)) as VoxieCaptureVolume;
            short B                = (short)InputController.Instance.GetButton(button_name, 1);
            int   button_state     = vcv.GetButtons(player) & B;
            int   old_button_state = vcv.GetOldButtons(player) & B;

            return(old_button_state == 0 & button_state > 0);
        }
Пример #2
0
        public static bool GetButtonUp(string button_name)
        {
            VoxieCaptureVolume vcv = FindObjectOfType(typeof(VoxieCaptureVolume)) as VoxieCaptureVolume;
            int B                = (int)InputController.Instance.GetButton(button_name, 1);
            int button_state     = vcv.GetButtons(0) & B;
            int old_button_state = vcv.GetOldButtons(0) & B;

            return(old_button_state > 0 & button_state == 0);
        }