close
The CCSpeed action modifies the duration of the inner action.
1 |
id move = [CCMoveBy actionWithDuration:3 position:ccp(350,0)]; |
2 |
id action = [CCSpeed actionWithAction: move speed:1.0f]; // no speed modification |
3 |
4 |
// but you can modify the speed later |
5 |
[action setSpeed: 2.5f]; // speed is 2.5 faster |
6 |
7 |
[action setSpeed: 0.5f]; // speed is 0.5 faster (it means 2 times slower) |
全站熱搜