Reputation: 16298
Is there a way to animate the colors of a CCLayerGradient over time? I'm thinking of some CC*** function like CCBezierTo... Is there something to animate arbitrary values of an object?
Upvotes: 1
Views: 195
Reputation: 64477
Use CCActionTween for this. It allows you to change the value of a property over time by providing the property's name.
Only works with integral data types such as int, float but not structs such as CGPoint, CGRect. But it's easy enough to create a category with (for example) positionX and positionY properties which update the corresponding x/y value of a CGPoint property.
Upvotes: 2