我已经成功地将精灵转了45度,现在我需要它把45度转回0度,但是下面的代码把它转得太快了,你甚至看不到它,所以它看起来不像是在移动。
SKAction *rotate = [SKAction rotateToAngle:M_PI_4 duration:0.1 shortestUnitArc:YES];
[actor runAction: rotate];
SKAction *rotate2 = [SKAction rotateToAngle:0 duration:0.1 shortestUnitArc:YES];
[actor runAction: rotate2];我怎么把它调到45度,然后逐渐回到0度呢?
谢谢!
发布于 2014-03-14 17:49:59
您需要按如下方式对操作进行排序:
[actor runAction:[SKAction sequence:@[rotate, rotate2]];https://stackoverflow.com/questions/22392887
复制相似问题