Hello, I’m not sure which way is the right one so I’m gonna ask:
Is this one right?
nloDrop = function() nlo.collision = nloCollision nlo:addEventListener("collision", nlo) end function nloCollision(self, event) self:removeEventListener("collision", self) -- THIS PART self:removeSelf() self = nil end
Or is this one right?
nloDrop = function() nlo.collision = nloCollision nlo:addEventListener("collision", nlo) end function nloCollision(self, event) self:removeEventListener("collision", nlo) -- THIS PART self:removeSelf() self = nil end
I think both ways work, but I don’t know which one is better.
Thanks.