Playn - 渲染空心物体
是否有渲染空心/矢量对象的标准方法(即它们没有附加图像,只有边框)?
我希望它们也能被物理模拟为动态对象。
Is there a standard way to render hollow/vectorial objects (i.e. they have no image attached, only a border)?
I want them to be physically simulated as dynamic objects as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

如果您的对象是矩形,您可以调用 Canvas.StrokeRect,如下所述:
http://code.google.com/p/playn/wiki/GraphicsArchitecture
至于对对象进行物理处理,这是一个单独的问题,但您可以查看示例以了解如何使用 Box2D 来运行物理模拟。
If your objects are rectangles, you can call Canvas.strokeRect, as described here:
http://code.google.com/p/playn/wiki/GraphicsArchitecture
As for doing physics on objects, that's a separate question, but you can look at the samples to see how to use Box2D to run a physics sim.