示例#1
0
 public static bool GetAnyPressEx <TRole>(TRole role, ControllerButtonMask mask, bool usePrevState = false)
 {
     return(mask.GetAnyPress(GetPressEx(role, usePrevState)));
 }
 public static bool GetAnyPress <TRole>(TRole role, ControllerButtonMask mask, bool usePrevState = false)
 {
     return(mask.GetAnyPress(usePrevState ? GetState(role).PreviousButtonPressed : GetState(role).CurrentButtonPressed));
 }
示例#3
0
 public static bool GetAnyPress(Type roleType, int roleValue, ControllerButtonMask mask, bool usePrevState = false)
 {
     return(mask.GetAnyPress(GetPressEx(roleType, roleValue, usePrevState)));
 }
        //public static bool GetAllPressDown(ViveRoleProperty role, ControllerButtonMask mask)
        //{
        //    return GetAllPressDown(role.roleType, role.roleValue, mask);
        //}

        //public static bool GetAllPressUp(ViveRoleProperty role, ControllerButtonMask mask)
        //{
        //    return GetAllPressUp(role.roleType, role.roleValue, mask);
        //}

        public static bool GetAnyPress(Type roleType, int roleValue, ControllerButtonMask mask, bool usePrevState = false)
        {
            return(mask.GetAnyPress(usePrevState ? GetState(roleType, roleValue).PreviousButtonPressed : GetState(roleType, roleValue).CurrentButtonPressed));
        }