Choosing random image for SKSpriteNode
问题 I am trying to build a simple obstacle jumping app. I want the image for the obstacle to be picked randomly from a set of images. I have tried using a combination of the arc4random_uniform function and switch case but that doesn't seem to update the SKSpriteNode. What am i doing wrong? class PlayScene: SKScene, SKPhysicsContactDelegate{ ... var block3 = SKSpriteNode(imageNamed: "lion") .... } override func update(currentTime: NSTimeInterval) { ..... blockRunner() } func blockRunner() { var