Search code examples
iosobjective-ccocos2d-iphonetint

Cocos2D. How to tint a sprite back?


Let's say i've applied the following tinting to my sprite:

CCTintTo *tint = [CCTintTo actionWithDuration:2 red:50 green:50 blue:50];
[self runAction:tint];

How do i tint it back? How to recover previous color and make the sprite look as it looked before?


Solution

  • Simple:

    sprite.color = ccWhite;