I want to change the size of my SKNode with a variable so it can be made smaller with a for loop. It is giving me an error:
Cannot find an initializer for type 'CGSize' that accepts an argument list of type '(width:... , height:...)'
for (var i = 0.9; i > 0.0; i -= 0.1){
for (var k = 1.25; i > 0.0; i -= 0.1){
self.sun.size = CGSize(width: self.size.width * i, height: self.size.height * k) // error here
}
}
I ran this SKAction code instead of a for loop suggested by ABakerSmith and it looks a lot cleaner.