i’ve got the score to show up but it doesnt count when the fruit is hit
[code]
function shootObject(type)
local object = type == “fruit” and getRandomFruit() or getBomb()
fruitGroup:insert(object)
object.x = display.contentWidth / 2
object.y = display.contentHeight + object.height * 2
fruitProp.radius = object.height / 5
physics.addBody(object, “dynamic”, fruitProp)
if(type == “fruit”) then
object:addEventListener(“touch”, function(event) chopFruit(object) getScore() scorePoint() end)
else
local bombTouchFunction
bombTouchFunction = function(event) explodeBomb(object, bombTouchFunction); end
object:addEventListener(“touch”, bombTouchFunction)
end
local getScore()
local scoreDisplay = display.newText( ("Score " … playerPoints), 0, 0, “ArialRoundedMTBold”, 30 )
scoreDisplay.x = display.contentWidth / 2 + 230
scoreDisplay.y = display.contentHeight / 2 - 50
scoreDisplay:setTextColor( 255,255,255 )
group:insert(scoreDisplay)
[/code] [import]uid: 74663 topic_id: 12636 reply_id: 312636[/import]