SKAction scaleBy: duration: SpriteKit
2d-games, ios, iphone, objective-c, sprite-kit
Solution
Try:
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];
Problem
I have a trouble trying to make one circle big and small using `[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]; ``` What I get is the circle becoming so small that disappears and then doesn't come back. It has to become small and then come back to his original size doing it 2 times.