[cocos2d] Using Particles
In this post i'm show how to create a simple particle effects using cocos2d and Particle Designer app.
Particle Designer is a software produced by 71Squared, with him you can create a visual effects for games, you can buy for only US$7,99.
That's a simple way to use a Particle Designer:
1 - Double click for select a effect
2 - Configure a effect attributes (image2)
3 - Save with plist file format (image3)
Now we implement the particle in an example application
Create a default cocos2d application template
Import a Particle Designer plist file to project
Now on the HelloWorld Scene overwrite method init
-(id) init
{
if( (self=[super init] )) {
CCParticleSystemQuad *fire = [CCParticleSystemQuad particleWithFile:@"fire.plist"];
CGSize size = [[CCDirector sharedDirector] winSize];
fire.position = ccp( size.width /2 , size.height/2 );
[self addChild:fire];
}
return self;
}
and the final result
Download and fork github lighter project
https://github.com/ferbass/lighter
I hope you enjoy the article
Particle Designer
cocos2d