Slide 24
Slide 24 text
• create new method spawnEnemy() and call it from didMoveToView()!
• startPt=x: CGFloat.random(min:0, max: frame.size.width), y: frame.size.height!
• fallPt = x: startPt.x, y: 160.0!
• enemy = SKSpriteNode(imageNamed: “mwd1”)!
• position = startPt, name = “enemy”, setScale(0.2)!
• load and run frame animation on enemy with name ”mwd” and 9 steps
!
• create and run scale animation on enemy: SKAction.scaleTo(2.0, duration: 7.0)!
• create and run move animation: SKAction.moveTo(fallPt, duration: 5.0)
~10 min