开发者

Drawing curved lines in Corona, during a drag gesture?

开发者 https://www.devze.com 2023-03-04 06:20 出处:网络
I\'m trying to implement a feature that allows the user to draw Curved lines whilst doing a drag gesture in Corona and so far hav开发者_开发百科e only been able to draw straight lines.

I'm trying to implement a feature that allows the user to draw Curved lines whilst doing a drag gesture in Corona and so far hav开发者_开发百科e only been able to draw straight lines.

Can the community assist me with any code or links to tutorials that can assist me in implementing this?


Well you could do a curved line as a series of short straight lines, using an enterFrame listener to get the touch point each frame.

More generally, make sure to look at the Martian Control example for how they draw lines: http://blog.anscamobile.com/2010/12/martian-control-another-open-source-game-made-with-corona-sdk/

0

精彩评论

暂无评论...
验证码 换一张
取 消