Hello Corona members,
I am quite new, and I want to add this little code on the begining of the main.lua
When you print line.x or line.y, you got the origin.
Why not to put my code by default inside the corona sdk project to be able to print line.x1 , line.y1, line.x2, line.y2 etc…
local originLine=display.newLine function display.newLine(...) local params=arg local debut=((type(arg[1])=="table") and 4)or 3 //to know if the parent group of line is display.currentStage or an other display Group local line=originLine(unpack(params)) for k=1,(-debut+1+#params)/2 do //I put k-value on xi's and yi's coordonate of line line["x"..tostring(k)]=params[debut+2\*(k-1)] line["y"..tostring(k)]=params[1+debut+2\*(k-1)] end return line end
Thank you.