开发者

How to draw a line using a texture with Cocos2D

开发者 https://www.devze.com 2023-02-28 10:53 出处:网络
How can I draw a line using a texture in Cocos2D? Specifically I\'m looking to create an 开发者_运维问答effect similar to: http://www.slickcar.com/products/purple-neon.jpg

How can I draw a line using a texture in Cocos2D? Specifically I'm looking to create an 开发者_运维问答effect similar to: http://www.slickcar.com/products/purple-neon.jpg

Thanks!


Check out this repository https://github.com/hiepnd/cocos2d-ext/. CCNode+Ext.h has a function called (drawLineFrom:to:texture:baseLength:stretch:). Hope it helps :)

0

精彩评论

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