更新时间:2023-11-19 15:37:22
不过,没有setColor那么简单,在Cocos2d 2.x中,有了OpenGL ES 2.0的支持,你可以通过使用自定义着色器来实现.您可以从这里开始:http://www.raywenderlich.com/10862/how-to-create-cool-effects-with-custom-shaders-in-opengl-es-2-0-and-cocos2d-2-x
However, not as easy as setColor, in Cocos2d 2.x, with OpenGL ES 2.0 support, you can achieve this by using custom shaders. You can get started here: http://www.raywenderlich.com/10862/how-to-create-cool-effects-with-custom-shaders-in-opengl-es-2-0-and-cocos2d-2-x
您也可以尝试反转精灵的较深颜色以获得较浅的颜色.
You may also try inverting the sprite's darker color to get a lighter one.