i'm new to this board , so hello erstmal
i have a small problem with the cocos2d particle emitter.
cocos2d is a real nice framework and everything i tried worked fine till now.
for a small game i wanted to add a particle emitter
i tried different ways but none of them seemed to work
here is a snippet of the currently used test setup:
(invoked in onEnter method of the layer)
- Code: Select all
CCParticleFlower particle = CCParticleFlower.node();
particle.setTexture(CCTextureCache.sharedTextureCache().addImage("zap.png"));
particle.setPosition(200,200);
particle.setLife(10.0f);
particle.setDuration(1.5f);
particle.setSpeed(100);
particle.setAutoRemoveOnFinish(true);
addChild(particle,0);
nothing appears.
i also tried to set it up with a schedule("createParticles",xx) method.
then the logcat throws this exception:
04-09 00:59:55.452: WARN/System.err(16403): java.lang.NullPointerException
04-09 00:59:55.452: WARN/System.err(16403): at org.cocos2d.actions.CCTimer.update(CCTimer.java:61)
04-09 00:59:55.460: WARN/System.err(16403): at java.lang.reflect.Method.invokeNative(Native Method)
04-09 00:59:55.460: WARN/System.err(16403): at java.lang.reflect.Method.invoke(Method.java:521)
04-09 00:59:55.468: WARN/System.err(16403): at org.cocos2d.actions.CCScheduler.tick(CCScheduler.java:196)
i used the cocos2d.jar lib from github.
has anyone noticed the same problem or got a quick fix?
would appreciate your help
sc


