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)
 
arrow
arrow
    全站熱搜

    zer931 發表在 痞客邦 留言(0) 人氣()