+(id) particleWithFile:(NSString*)plistFile;
-(id) initWithFile:(NSString*) plistFile;
CCTextureCache
+ (CCTextureCache *) sharedTextureCache;
-(CCTexture2D*) addImage:(NSString*) fileimage;
使用缺省粒子特效
CCParticleSystem *snow= [CCParticleSnow node];
snow.texture = [[CCTextureCachesharedTextureCache] addImage:@"snow.png"];
[self addChild:snow];
CCParticleSystemQuad
使用了ARMNEON图形GPU芯片特性
CCParticleSystemPointARM老式CPU
使用粒子设计器产生plist
CCParticleSystem *system =[ARCH_OPTIMAL_PARTICLE_SYSTEM
particleWithFile:@"bird-explosion.plist"];
system.positionType = kCCPositionTypeFree;
system.autoRemoveOnFinish = YES;
本文介绍如何在Cocos2d-x中使用粒子系统,包括加载默认粒子效果、自定义粒子效果以及通过粒子设计器创建粒子效果文件。文中还涉及了不同类型的粒子系统及其硬件加速特性。
1127

被折叠的 条评论
为什么被折叠?



