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?

有帮助吗?

解决方案

Simple:

sprite.color = ccWhite;

其他提示

Have you tried?

CCTintTo *tint = [CCTintTo actionWithDuration:0 red:255 green:255 blue:255];
[self runAction:tint];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top