So I am making an apple catch! game. I am stuck on a simple counter. Like I try doing
update = function()
for a in apples then
if Quick.spriteCollision(a,player) then
Well the score increases infinitely or like stop at 548 some time
I NEED HELP!
Shouldn't it be:
a is missing in your snippet.
Also I just edited my answer because I realized you have to use
removeElement, rather than
remove expects the index of the element you want to remove, not the object itself. If all you have is a reference to the element that should be removed, you have to use
Quick.removeElement(a) changed to
Quick.remove(a), as pointed by @Crafterz125
Thank you all mighty gilles:)
I do it like this,
since Quick Engine uses
Quick.remove() rather than
Correct, thanks for pointing the error, I edited my above reply.