How can I remove a few lines.
I wrote a lua code for a simple writing or drawing board, but when I draw a line, it automatically draws another from the point where I start to draw to one of the corners. Works well in the Computer, but when I step into the cell appear thats lines. I’d like to know what the problem might be. Thank you.
line={}; local t=1
function dibujar(e)
if e.phase==“began” then
line[t] = display.newLine(e.x,e.y,e.x,e.y)
line[t].width =6
end
if e.phase==“moved” then
line[t]:append(e.x,e.y)
end
if e.phase==“ended” then t=t+1 end
end
Runtime:addEventListener(“touch”, dibujar)