【发布时间】:2017-04-09 19:34:38
【问题描述】:
我很好奇在我的游戏中使用什么。计时器:
let goodFPS = SKAction.wait(forDuration: 0.01666)
let mainGameRunner = SKAction.run {
//my code is here
}
let toRepeat = SKAction.repeatForever(SKAction.sequence([goodFPS,mainGameRunner]))
inGameHighScore.run(toRepeat,withKey:"mainGame")
或更新函数:
override func update(_ currentTime: TimeInterval){
//my code is here
}
哪个提供更快更一致的更新?
注意:我的帧率在 45 到 58 范围内
【问题讨论】:
标签: swift sprite-kit