There are at least two ways of doing moving or another things with sprite objects:
1. Use update function where you can update your coordinates
2. Use Actions.
Now I’m thinking about what would be better. I don’t want to generate flame or something, I just need an advise.
I’m not sure about some things but I’ll tell you how I understand it..
For example I need my object to accelerate. What should I do in both of ways ?
1. In update func I just need some formula being applied to my object.
2. If I want to do it by action, I should derive from CCAction and make my own action. Am I correct ? If so, it’s good, if not.. mm.. is it possible ? )
So both variants are good. But what should I do if I have a complex object ? For example bicycle. It has wheels, handle bar, pedals and so on. For example I want my bicycle to move. Again:
1. In Bicycle::update(float dt) I put some code that make every sprite according to the rules I invented for my game.
2. I’m not sure what to do here.. Should I create an action for each sprite ? Isn’t it bad? - because every time you make an action you do new() - allocations.
I just a little bit confused about Actions philosophy.
Thank you in advance.:)