Color Changing Sprites Cocos2d

前端 未结 3 2131
礼貌的吻别
礼貌的吻别 2021-02-10 22:10

I need my sprite to transition to one color to another and on and on... like blue tint then green then purple, but i cannot find any good actions for that and am wondering, shou

3条回答
  •  没有蜡笔的小新
    2021-02-10 22:34

    you can use CCTintTo action to change the color of the sprite

    [sprite runAction:[CCTintTo actionWithDuration:2 red:255 green:0 blue:0]];
    

提交回复
热议问题