0
我試着去實現這個代碼,一個UIView但對於一個SKSprite節點:斯威夫特:轉換SKSpriteNode
stopIcon.transform = CGAffineTransformMakeScale(0.01, 0.01)
UIView.animateWithDuration(0.5, animations: {() -> Void in
self.stopIcon.transform = CGAffineTransformMakeScale(1.0, 1.0)
})
我SKSprite節點設置這樣的:
stopIcon = SKSpriteNode(imageNamed: "StopIcon")
stopIcon?.size = CGSize(width: ((stopImage?.size.width)! * 0.75), height: ((stopImage?.size.height)! * 0.75))
stopIcon?.position = CGPoint(x: self.size.width * 0.22, y: self.size.height * 0.91)
self.addChild(stopIcon!)
謝謝大家。
你是了不起的! – OriginalAlchemist