我正在尝试将CCParticleFlower添加到我的Cocos2d v2.0 (启用了ARC ) HelloWorld场景中。这就是我正在运行的代码:
CCParticleFlower* system = [[CCParticleFlower alloc] initWithTotalParticles:10];
// Set some parameters that can't be set in Particle Designer
// system.positionType = kCCPositionTypeFree;
// system.autoRemoveOnFinish = YES;
system.visible = TRUE;
[system setDuration:4.0f];
system.position = CGPointMake(150.0f, 100.0f);
[self addChild:system z:0]; 我尝试了几个变体,但我不太确定我做错了什么,因为我从未设法运行它。
例如:
CCParticleSystem * system = [CCParticleFlower node];
system.position = CGPointMake(150.0f, 100.0f);
[self addChild:system]; 发布于 2012-08-04 16:09:52
https://stackoverflow.com/questions/11799415
复制相似问题