Hello,
I’ve done my app and it works great on the Corona Simulator, but, once I run it on my device, it doesn’t run a bunch of instruction.
These are:
function onCollision( event ) if ( event.phase == "began" ) then if event.object1.myName == “gd” and event.object2.myName == “hero” then speed = 0 local matchScore = score.get() local bestScore = (bestScore or 0) + score.load() if (matchScore \< bestScore) then best.alpha = 1 scoreToBeat.text = score.load() scoreToBeat.alpha = 1 else score.save() newRecord.alpha = 1 end end end end Runtime:addEventListener( "collision", onCollision )
Particularly, it performs only “speed = 0” and only the first time I run the app, which means that if I start a new game, it won’t even work “speed = 0”.
I’m 100% sure that the app is running on the device is the same that runs on the simulator (I tried to change some text).
What can I do? Thanks!