sprite kit - Change spritekit particle color -


Is it possible to change the color of the particle after creation in the spritekit editor? I tried setParticleColor but it does not appear to do anything. Actually I have a way to programmatically change the color on a particle file and fried ...

particlecolor property is not working due to the color ramp setting in the particle editor, they are actually stored in particleColorSequence , which ignores all other particle color properties.

So, for this to work, you have to override the particleColorSequence setter and make it zero first, then you will see the particle texture (full blending 1.0 ) To set the particleColorBlendFactor to fully blend your chosen color. Since then, any clear particle color settings should work:

  emitter.particleColorSequence = zero; Emitter.particleColorBlendFactor = 1.0; Emitter.particleColor = [SKColor redColor];  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -