protected void ProcessPointerEvent(ZPointer pointer) { for (int i = 0; i < pointer.ButtonCount; ++i) { ZPointerEventData eventData = this.GetEventData(pointer, i); // Process button press/release events. if (pointer.GetButtonDown(i)) { this.ProcessButtonPress(eventData); } if (pointer.GetButtonUp(i)) { this.ProcessButtonRelease(eventData); } // Process move/scroll events only for the primary button. if (eventData.button == PointerEventData.InputButton.Left) { this.ProcessMove(eventData); this.ProcessScroll(eventData); } // Process drag events. this.ProcessDrag(eventData); } }
private void DoZSpaceRaycast() { if (ZPointer.GetButtonDown(2)) // id == 2 is the left stylus button (triangle) { RaycastResult result = ZPointer.PressHitInfo; if (!result.gameObject) { return; } hName = result.gameObject.name; switch (Compare.first) { case 0: // do nothing? return; case 1: if (!Compare.pieces2.Contains(hName)) { if (Compare.pieces1.Contains(hName)) { outRemove(hName, 1); } else { outAdd(hName, 1); } } return; case 2: if (!Compare.pieces1.Contains(hName)) { if (Compare.pieces2.Contains(hName)) { outRemove(hName, 2); } else { outAdd(hName, 2); } } return; } } }