實現一秒鐘後觸發的方法

SKAction:

let waitForOneSecond = SKAction.waitForDuration(1)let action =SKAction.runBlock(){action()} let sequence = SKAction.sequence([waitForOneSecond,action]) self.runAction(sequence)

NSTimer:

NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: #selector(action), userInfo: nil, repeats: false)