【发布时间】:2014-02-11 06:27:11
【问题描述】:
我正在尝试在我的 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