Hi guys can anyone help me on how I would code a timer update which increases on colliding with a specific object using corona sdk and LUA.
Basically a timer will countdown and if a player collides with a star then the timer should go + 5 etc.
heres my timer set up
function timerDown()
timeLimit = timeLimit-1
timeLeft.text = timeLimit
And the star
star = display.newImage("star1.png")
star.name = "star"
star.x = 700
star.y = 200
physics.addBody(star, "static")
Thanks guys.
physics.addBody()NOTE: This API should not be used in a Collision Event handler. - hjpotter92