protected virtual void drawDebug(int touchPoints) { if (!DebugMode) { return; } var color = State == GestureState.Possible ? Color.red : Color.green; switch (touchPoints) { case 1: GLDebug.DrawSquareScreenSpace(debugID, getPointScreenPosition(0), 0f, debugPointerSize, color, float.PositiveInfinity); GLDebug.RemoveFigure(debugID + 1); GLDebug.RemoveFigure(debugID + 2); break; default: var newScreenPos1 = getPointScreenPosition(0); var newScreenPos2 = getPointScreenPosition(1); GLDebug.DrawSquareScreenSpace(debugID, newScreenPos1, 0f, debugPointerSize, color, float.PositiveInfinity); GLDebug.DrawSquareScreenSpace(debugID + 1, newScreenPos2, 0f, debugPointerSize, color, float.PositiveInfinity); GLDebug.DrawLineWithCrossScreenSpace(debugID + 2, newScreenPos1, newScreenPos2, .5f, debugPointerSize * .3f, color, float.PositiveInfinity); break; } }
protected virtual void drawDebug(Vector2 point1, Vector2 point2) { var color = State == GestureState.Possible ? Color.red : Color.green; GLDebug.DrawSquareScreenSpace(debugID + 1, point2, 0f, debugTouchSize, color, float.PositiveInfinity); GLDebug.DrawLineScreenSpace(debugID + 2, point1, point2, color, float.PositiveInfinity); }
protected virtual void drawDebug(Vector2 point1, Vector2 point2) { if (!DebugMode) { return; } var color = IsOpen == GestureState.Possible ? Color.red : Color.green; GLDebug.DrawSquareScreenSpace(debugID + 1, point2, 0f, debugPointerSize, color, float.PositiveInfinity); GLDebug.DrawLineScreenSpace(debugID + 2, point1, point2, color, float.PositiveInfinity); }
public void Show(Vector2 position) { if (!Application.isPlaying) { return; } if (currentDebugId != -1) { Hide(); } currentDebugId = GLDebug.DrawSquareScreenSpace(position, 0, Vector2.one * 20, GLDebug.MULTIPLY, float.MaxValue); }
private void addDebugFigureForPointer(Pointer pointer) { GLDebug.DrawSquareScreenSpace(TouchManager.DEBUG_GL_TOUCH + pointer.Id, pointer.Position, 0, debugPointerSize, GLDebug.MULTIPLY, float.PositiveInfinity); }
private void addDebugFigureForTouch(TouchPoint touch) { GLDebug.DrawSquareScreenSpace(TouchManager.DEBUG_GL_TOUCH + touch.Id, touch.Position, 0, debugTouchSize, GLDebug.MULTIPLY, float.PositiveInfinity); }