I just recently upgraded to Xcode 4 and have been using Cocos2d-x 0.8.5. Everything was working fine, well at least it seemed like it was in Xcode 3, now my Particle effect is hitting an assert at:
Here is my code, what am I doing wrong:
header:
CCParticleSystem* emitter;
source:
// Setup key emitter
item.emitter = CCParticleExplosion::node();
//item.emitter = new CCParticleExplosion;
item.emitter->initWithTotalParticles(5); — Crashes in here!
I get this assert:
#if COCOS2D_DEBUG >= 1
tHashUpdateEntry *pHashElement = NULL;
HASH_FIND_INT(m_pHashForUpdates, &pTarget, pHashElement);
assert(pHashElement NULL);
#endif
Assertion failed: (pHashElement NULL), function scheduleUpdateForTarget, file /Mikes/iTouchDev/Projects/Cannon/CannonBallBounce/CannonBallBounce/libs/cocos2dx/CCScheduler.cpp, line 492.
What is going on? In release it doesn’t assert, but that is because of the COCOS2D_DEBUG define isn’t defined, but now I feel like I am doing something wrong in release. Am I not using the particle system correctly?
Thanks in advance.