예제 #1
0
        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);
                }
            }
        }
예제 #2
0
파일: CardSnap.cs 프로젝트: liangyee/Wizard
 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);
     }
 }