public void debugDraw(SpriteBatch spriteBatch, TouchCollection touchCollection) { foreach (LineSeg line in lines) { DebugGUI.line(spriteBatch, line.A, line.B, Color.Gray); } foreach (Vector2 point in getSafeBounds()) { DebugGUI.point(spriteBatch, point, Color.Blue); } foreach (TouchLocation touch in touchCollection) { foreach (Vector2 point in getSafeBounds()) { Color col = Color.Red; if (raytrace(point, touch.Position)) { col = Color.Green; } DebugGUI.line(spriteBatch, point, touch.Position, col); } } }
public void debugDraw(SpriteBatch spriteBatch) { DebugGUI.line(spriteBatch, new Vector2(position.X, position.Y), new Vector2(length, position.Y), Color.Black); DebugGUI.line(spriteBatch, new Vector2(leftLimit, position.Y), new Vector2(leftLimit + bufferedLength, position.Y), Color.Red); foreach (Vector2 node in nodes) { DebugGUI.point(spriteBatch, node, Color.Lime); } }