Hey Corona Users! So I have this:
function moleHit:tap(e) lastmole.isVisible = false local t = e.target if t.type == "mole" then audio.play(hit) molesHit = molesHit + 50 moleHit = display.newText('+50', 380, 45, native.systemFontBold, 18) moleHit:setTextColor(255, 0, 0) transition.to( moleHit, { time=800, alpha=.01 } ) score.text = molesHit end
That basically is my hit function for a mole that pops up and once you hit it, you score 50 points. Okay what I need help is on this, What if I want my mole to be “hit” twice before you can gain the 50 points, how would I go about that, any ideas? thanks and happy coding!