public static bool IsViveTriggerValue(this ColliderAxisEventData eventData) { if (eventData == null) { return(false); } return(eventData is ViveColliderTriggerValueEventData); }
public static bool IsVivePadAxis(this ColliderAxisEventData eventData) { if (eventData == null) { return(false); } return(eventData is ViveColliderPadAxisEventData); }
public static bool IsVivePadAxisEx <TRole>(this ColliderAxisEventData eventData, TRole role) { if (eventData == null) { return(false); } if (!(eventData is ViveColliderPadAxisEventData)) { return(false); } return((eventData as ViveColliderTriggerAxisEventData).viveRole.IsRole(role)); }
public static bool IsVivePadAxis(this ColliderAxisEventData eventData, HandRole hand) { if (eventData == null) { return(false); } if (!(eventData is ViveColliderPadAxisEventData)) { return(false); } return((eventData as ViveColliderTriggerAxisEventData).viveRole.IsRole(hand)); }
public static bool IsViveTriggerValue(this ColliderAxisEventData eventData, HandRole hand) { if (eventData == null) { return(false); } if (!(eventData is ViveColliderTriggerValueEventData)) { return(false); } var viveEvent = eventData as ViveColliderTriggerValueEventData; return(viveEvent.hand == hand); }
public static bool TryGetVivePadAxisEventData(this ColliderAxisEventData eventData, out ViveColliderPadAxisEventData viveEventData) { viveEventData = null; if (eventData == null) { return(false); } if (!(eventData is ViveColliderPadAxisEventData)) { return(false); } viveEventData = eventData as ViveColliderPadAxisEventData; return(true); }