示例#1
0
        public override void DrawPolygon(Vec2[] vertices, int vertexCount, Color color)
        {
            var firstVertex = vertices[0].ToVector2();
            var vectors     = vertices.Take(vertexCount).Select(vertex => vertex.ToVector2() - firstVertex).ToArray();

            _spriteBatch.DrawPolygon(firstVertex, vectors, color.ToXnaColor());
        }
示例#2
0
 public override void DrawSegment(Vec2 p1, Vec2 p2, Color color)
 {
     _spriteBatch.DrawLine(p1.ToVector2(), p2.ToVector2(), color.ToXnaColor());
 }
示例#3
0
 public override void DrawCircle(Vec2 center, float radius, Color color)
 {
     _spriteBatch.DrawCircle(center.ToVector2(), radius, 32, color.ToXnaColor());
 }