In another post i was told putting this :
elseif ( phase == "did" ) then physics.start() block:addEventListener( "collision",block ) myObject:addEventListener( "collision",myObject ) if event.phase == "began" and event.target == block and event.other == myObject then score.add(1) end -- Called when the scene is now on screen. -- Insert code here to make the scene come alive. -- Example: start timers, begin animation, play audio, etc. end end
In my collision handler would make the score go up ., It still stays at zero oncollision . What did I do wrong .What do I do to fix my mistake .
Thanks .