Jay Gajjar
Jay Gajjar

Reputation: 2741

How remove color of ccsprite?

I had applied color to a ccsprite. The sprite is initilize with an image of green color. After then i applied red color to it. Now how to remove the red color and bring it back to original image color?

Suppose this is the original image enter image description here

Now when i apply red color to it, it is colored as red. My question is how to remove this color which i recently applied?

The code i use is

CCSprite *ballSprite=[[CCSprite alloc]initWithFile:@"ball.png"];
ballSprite.color=ccRED;

Upvotes: 1

Views: 325

Answers (1)

CodeSmile
CodeSmile

Reputation: 64477

Simple:

allSprite.color = ccWHITE;

Upvotes: 3

Related Questions