iosxcodecocos2d-iphoneccparticlesystem

Particle designer plist when repeating plays in Cocos2d but not when single run like an explosion


I have a Particle designer plist in Cocos2d that plays ok when I use plist that "loops" or repeats itself e.g. a rainbow but does not display when single display e.g. an explosion.

I'm using cocos2d 2.0 in a vanilla template with a plists created in Particle Designer tool.

I'm using following code with iOS 5.1... am I missing something?

-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

CCParticleSystemQuad *particle = [CCParticleSystemQuad particleWithFile:@"explosion.plist"]; //alt plist working with rainbow.plist
        particle.position = ccp(240,160);
        [self addChild:particle z:20];
        particle.autoRemoveOnFinish = YES;

Solution

  • It seems it has to do with the blend function, which I don't understand (Bottom right corner of config screen). For benefit of others, while I don't have a low level explanation other than to suggest changing these to GL_ONE made it visible. Can't assume that because it displays in the PD simulator that it shows on device.