swift - Change CGSize with a variable -


i want change size of sknode variable can made smaller loop. giving me error:

cannot find initializer type 'cgsize' accepts argument list of type '(width:... , height:...)'

for (var = 0.9; > 0.0; -= 0.1){            (var k = 1.25; > 0.0; -= 0.1){                  self.sun.size = cgsize(width: self.size.width * i, height: self.size.height * k) // error here         }  }    

i ran skaction code instead of loop suggested abakersmith , looks lot cleaner.

var shrinksun = skaction.scaleby(0.5, duration: 2) self.sun.runaction(shrinksun) 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -