2
我試圖做出兩個動作的簡單序列,但Xcode是說我在調用中有一個額外的參數。我嘗試將Apples Obj-C示例翻譯成Swift,但它不太好。我究竟做錯了什麼?如何在Swift中創建序列?
func dead() {
let animateAction = SKAction.animateWithTextures(self.catArray, timePerFrame: 0.09)
let ending = SKAction.runBlock(self.gameOver)
let sequence = SKAction.sequence(actions: animateAction, ending)
self.cat.runAction(sequence)
}
是的,工作完美,謝謝!我忘了大括號。 – Burundanga 2015-04-03 20:00:39