我想在我的Cocos2d项目中使用粒子效果。粒子效果显示良好。但是当我把粒子显示功能放到线程中时,我很困惑,它只显示微小的黑色方块而不是正确的纹理。 thanx提前。如何在Cocos2d中显示粒子线程
// thread caller
[self performSelectorInBackground:@selector(showParticleThrd:) withObject:nil];
// it works good when i call it directly
-(void) showParticleThrd{
CCParticleSystem * system = [[ParticleEffectSelfMade alloc] initWithTotalParticles:1];
[aLayer removeChildByTag:R_TAG cleanup:YES];
system.position = ccp(self.position.x,self.position.y);
[self.parent addChild:system z:R_ORDER tag:R_TAG];
[system release];
}
PS:请开始使用ARC – LearnCocos2D