真机调试和模拟有差别,
-(void) setParticleSystem;
{
smoke = [CCParticleSmoke node];
smoke.position = ccp(-100,12);
smoke.texture = [[CCTextureCache sharedTextureCache] addImage: @"fire.png"];
//--------变小了
smoke.emitterMode = kCCParticleModeGravity;
smoke.startSize = 10.0f;
smoke.startSizeVar = 10.0f;
smoke.endSize = 30.0f;
smoke.endSizeVar = 30.0f;
smoke.totalParticles = 5;
smoke.life = 1.0f;
[_scene addChild:smoke];
}
主要是这一行代码
smoke.texture = [[CCTextureCache sharedTextureCache] addImage: @"fire.png"];
真机没有贴图,加上贴图就可以了