我在尝试使用 [SKAction scaleBy: duration:]
制作一个大圆圈和小圆圈时遇到了麻烦
SKAction *scaleDown = [SKAction scaleBy:0.2 duration:1.8];
SKAction *scaleUp= [scaleDown reversedAction];
SKAction *fullScale = [SKAction sequence:@[scaleDown, scaleUp, scaleDown, scaleUp]];
[_circleChanging runAction:fullScale];
我得到的是圆圈变得如此之小以至于消失然后不再回来。它必须变小,然后再做 2 次回到原来的大小。
最佳答案
尝试:
SKAction *scaleDown = [SKAction scaleTo:0.2 duration:0.75];
SKAction *scaleUp= [SKAction scaleTo:1.0 duration:0.75];
SKAction *fullScale = [SKAction repeatActionForever:[SKAction sequence:@[scaleDown, scaleUp, scaleDown, scaleUp]]];
[_circleChanging runAction:fullScale];
关于ios - SKAction scaleBy : duration: SpriteKit,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20355564/