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)
 
文章標籤
全站熱搜
創作者介紹
創作者 zer931 的頭像
zer931

zer931的部落格

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