You can call several simple particle effects in cocos2d. A smoke particle effect example is shown here.
Syntax:
CCParticleSmoke *smoke_ = [[CCParticleSmoke alloc]init];
smoke_.texture = [[CCTextureCache sharedTextureCache]
addImage:@"smokeImage.png"];
smoke_.life = 1.0;
smoke_.duration = 2;
smoke_.position = ccp(240, 160);
[self addChild:smoke_ z:2];
Syntax:
CCParticleSmoke *smoke_ = [[CCParticleSmoke alloc]init];
smoke_.texture = [[CCTextureCache sharedTextureCache]
addImage:@"smokeImage.png"];
smoke_.life = 1.0;
smoke_.duration = 2;
smoke_.position = ccp(240, 160);
[self addChild:smoke_ z:2];
No comments:
Post a Comment