So i started new project with game based psyhics and everything loaded up as it shoud. I am begginer in the corona language and the best way i can learn is through an examples... I want to make the falling box which is this piece of code
-- make a box(off-screen), position it, and rotate slightly local box = display.newImageRect( "box.png", 40, 40 ) box.x, box.y = 160, -100 box.rotation = 33
to be clickable. Can anyone show me an example where should i add eventListeners or how can i make multiple boxes fall off-screen but without repeating the code... i copyed this code and pasted like 10 times to make 10 boxes fall from the sky but i know thats not correct way to do it.
this is inside `level1.lua` file as i said i created new project with "Physics-Based Game" options