Hi,
I am currently creating a new game.
There’s 2 squares, one that moves down, and one that moves right.
Sorry I’m typing this from my phone, I don’t know how to add my following lines in a code typo, but here an approximate on what I wrote:
local squareRight = display.newRect(0,0,50,50)
local squareDown = display.newRect(200,0,50,50)
function touchRight(event)
if event.phase == “began” then
transition.to(squareRight, {time=200, x=squareRight.x+50, y=squareRight.y})
function touchDown(event)
if event.phase == “began” then
transition.to(squareDown, {time=200, x=squareDown.x, y=squareDown.y+50})
Event listners…
Now you can see that after touching the squareRight 4 times, it reaches the squareDown, what I want it to do is to move the squareDown when it reach it.
Is there anyway to do it? There are more box, this is just an example of what I wrote, thank you for your help, and for taking time to read this.
Regards,
Mike