Game Development Reference
In-Depth Information
startColor.g = 0.25f;
startColor.b = 0.12f;
startColor.a = 1.0f;
startColorVar.r = 0.0f;
startColorVar.g = 0.0f;
startColorVar.b = 0.0f;
startColorVar.a = 0.0f;
endColor.r = 0.0f;
endColor.g = 0.0f;
endColor.b = 0.0f;
endColor.a = 1.0f;
endColorVar.r = 0.0f;
endColorVar.g = 0.0f;
endColorVar.b = 1.0f;
endColorVar.a = 0.0f;
self.blendFunc = (ccBlendFunc){GL_SRC_ALPHA, GL_DST_ALPHA};
// or use this shortcut to set the blend func to: GL_SRC_ALPHA, GL_ONE
//self.blendAdditive = YES;
self.texture = [[CCTextureCache sharedTextureCache] addImage:@"fire.png"];
}
return self;
}
@end
CCParticleSystem Properties
In Listing 9-3 you will have noticed how verbose the code is simply because so many
particle system properties can be initialized. And most of them need to be set to accept-
able values in order to display a reasonably meaningful particle effect onscreen. Some
properties are even mutually exclusive and can't be used together. It's time to take a
close look at what these particle system properties actually do.
Variance Properties
Search Nedrilad ::




Custom Search