ygw y How to draw a line with Lua?
Posts 1
Added by ygw y about 1 year ago

code:
-- filename: test.lua
cocos2d.ccDrawLine(createPoint(10, 10),createPoint(100, 100))

the run screen has no effect。

ccDrawLine is only a method,not return object or class,so in the lua script ,can’t use draw method。

help me!!!

YuLei Liao RE: How to draw a line with Lua?
Posts 59
Added by YuLei Liao about 1 year ago

ccDrawLine only call in CCNode:draw()

Laurens Rodriguez RE: How to draw a line with Lua?
Posts 26
Added by Laurens Rodriguez about 1 year ago

It seems to me that ccDrawLine is not exported for Lua, I'm missing something?

Laurens Rodriguez RE: How to draw a line with Lua?
Posts 26
Added by Laurens Rodriguez about 1 year ago

I found a way to add primitive rendering functions to CCRenderTexture, I'll uploaded later on my Killa branch, however I only need points and lines but you'll could extend the method if interested.


(1-3/3)