Hello everyone
I am new to corona and I’m developing a game in which i am using “transition.to” to make a frog jump to different boxes of same size and shape. in fact all the boxes are the same image. but no matter what i do the frog always jumps to a single box.
I have made a table to store the images of the boxes. My code looks something like that:
local function jump()
frog:transition.to(frog, {x=object.x, y= object.y,})
end
I am confused as to what should I write in place of object.x and object.y. I have tried making a for loop but that also doesn’t work. it was like this
local function jump()
for i= 1, #boxes, do
transition.to(frog,{x=boxes[i].x, y= boxes[i].y,})
end
end
this is also not working. Any help will be greatly appreciated. Thank You.