Can I flip texture in cocos2d's particle system?
-
03-03-2021 - |
Question
I want to make an particle effect for fallen leaf or little paper fallen from above, like it was autumn or on a wedding. So I think maybe I could use a texture for leaf or paper, let them fallen from sky, in the mean time, texture should flip X/Y randomly. But I can't find any property or method to let me do this.
So my question is, can I? If I can't flip texture anyway, how can I make the effect?
Solution
The CCParticleSystem itself can't flip the textures randomly.
But since CCParticleSystem derives from CCNode you could try and set the scaleX/scaleY property to -1 to flip the entire particle system. That way you could run two particle systems at the same location, one flipped and the other unflipped.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow