When the bullet hits the character how do I add on to the users score ? This is what I have so far .
function onCollision( event ) if event.phase =="began" then Coins = Coins + 1 end end
centerX = 350 centerY = 60 Coins = 500 CoinsTxt = display.newText( "Coins: "..Coins, centerX, centerY, native.systemFontBold, 20 )
This code doesn’t work