title: Cannot align images in array (atlas) - SpriteKit
body: <p>I want simple animation from atlas textures in orders win1, win2, win3. My code:</p>
  
  <pre><code>var Image = SKSpriteNode()
  var ImageAtlas = SKTextureAtlas()
  var ImageArray = [SKTexture]()
  
  override func didMove(to view: SKView) {
  
      ImageAtlas = SKTextureAtlas(named: "Images")
      for i in 1...ImageAtlas.textureNames.count{
          let textureName = "win\(i).png"
          let texture = ImageAtlas.textureNamed(textureName)
          ImageArray.append(texture)
      }
  
      let firstFrame = ImageArray[0]
      Image = SKSpriteNode(texture: firstFrame)
      Image.setScale(0.7)
      Image.position = CGPoint(x: 0, y: self.frame.width / -1.5)
      Image.zPosition = 2
  
      self.addChild(Image)   
  </code></pre>
  
  <p>...</p>
  
  <pre><code>Image.run(SKAction.repeatForever(SKAction.animate(with: ImageArray, timePerFrame : 0.01)))
  </code></pre>
  
  <p>...</p>
  
  <p>When I play animation, textures are not in align win1, win2, win3 but for example win3, win1, win2. What is wrong. Thanks!</p>