Reputation: 71
This has been driving me mad. This code:
func nowPrint() {
print("RUN")
}
run(SKAction.repeatForever(
SKAction.sequence([
SKAction.run(addSpawn), SKAction.run(nowPrint),
SKAction.wait(forDuration: universalDuration/10)
])
)
)
(where universalDuration = 100) seems to be called twice, because every 10 seconds the console window prints "RUN" twice.
This code is contained in the sceneDidLoad() function, if that makes a difference.
Upvotes: 2
Views: 163