我想在我的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