我们知道SpriteKit的action中提供了两种wait action。一种是通过waitForDuration:来等待一个确定的时间,另一种是通过waitForDuration:withRange:来等待一个随机的时间。这个随机的时间的范围由两个参数确定:duration表征平均值,range表征区间大小。
For example if you set duration to 5.0 and range to 2.0 you will get wait times between 4.0 and 6.0
对于duration为5,range为2的随机等待时间,位于4.0和6.0之间。
参考:
http://stackoverflow.com/questions/21849431/sprite-kit-skaction-repeatactionforever-random-wait-duration