我正在尝试将 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];