_ so my question is to how to write a local function to make my object move on the top of the screen if i tap it…and also how to add event listener and sound in my game _
_ so my question is to how to write a local function to make my object move on the top of the screen if i tap it…and also how to add event listener and sound in my game _
create object:
object = display.newRect(125, 125, 45, 45)
local function move()
object.y = object.y+50
end
Runtime:addEventListener(“tap”, move)
create object:
object = display.newRect(125, 125, 45, 45)
local function move()
object.y = object.y+50
end
Runtime:addEventListener(“tap”, move)