public bool AllPressed(MobileUIActions actionPerformed, EventType eventUsed, PointerEventData data) { // Not the right event if ((eventUsed != eventType || eventUsed == EventType.None) && eventUsed != EventType.All) { return(false); } if (alwaysTriggerMobileActions || Application.isMobilePlatform) { if (actionPerformed == mobileAction) { return(true); } } if (data == null || data.button != button) { return(false); } if (keyCode != KeyCode.None && Input.GetKey(keyCode) == false) { return(false); } return(true); }
public InventoryActionInput(PointerEventData.InputButton button, EventType eventType, KeyCode keyCode, MobileUIActions mobileAction = MobileUIActions.None) { this.button = button; this.keyCode = keyCode; this.mobileAction = mobileAction; this.eventType = eventType; }
public InventoryActionInput(PointerEventData.InputButton button, EventType eventType, KeyCode keyCode, MobileUIActions mobileAction = MobileUIActions.None) { this.button = button; this.keyCode = keyCode; this.mobileAction = mobileAction; this.eventType = eventType; }
public bool AllPressed(MobileUIActions actionPerformed, EventType eventUsed, PointerEventData data) { // Not the right event if ((eventUsed != eventType || eventUsed == EventType.None) && eventUsed != EventType.All) return false; if (alwaysTriggerMobileActions || Application.isMobilePlatform) { if (actionPerformed == mobileAction) return true; } if (data == null || data.button != button) return false; if (keyCode != KeyCode.None && Input.GetKey(keyCode) == false) return false; return true; }