Hey guys, I have an issue with sprites… I’m doing a little puzzle game that imitates the behaviour of Tetris Attack.
Here’s a quick demo: http://www.albertosm.com/mozilla/ldmoz/demo.html
If you open the web console in your browser, you’ll see that everytime you click in a panel, the console will prompt which panel are you clicking.
It will show its ID (so that it differentiates from the other panels) and the type of panel it is (the number it has on the image).
This information is unique to each panel. Each panel is stored in an Array.
What I do is generate the tileset and then manually delete a series of panels for testing purposes. I delete them by doing removeChild from lazylayer and then setting them to null (For example: array = null). I also tried delete array.
Problem is that the mouse click still recognises an empty space as a panel, which is crazy since there’s no panel there!
As I said, I tried both “array = null” and “delete array” which work. But the mouse still thinks there is a sprite there.
I don’t know if I’m missing any kind of destructor method for cc.Sprite (or cc.Node)?