title: action does not wait till function call ends
body: <p>I have 2 actions that i put in a sequence. In the first action I am calling a method to calculate the new waiting time for the next action. The next action is just a wait for this duration, but the second action always executes straight away, so the time must be 0. I debugged it and in the method spawnFlowers i get the time returned as 3.5 seconds.</p>
  
  <p>these are my 2 actions</p>
  
  <pre><code>let spawnFlowerAction = SKAction.run {
              self.WaitTime = self.calculateWaitingTime()
          }
  let waitForNewFlower = SKAction.wait(forDuration: self.WaitTime)
  </code></pre>
  
  <p>I execute it this way:</p>
  
  <pre><code>        let spawnSeq = SKAction.sequence([spawnFlowerAction, waitForNewFlower])
          let spawnRepeat = SKAction.repeat(spawnSeq, count: 4)
          self.run(spawnRepeat)
  </code></pre>
  
  <p>Result: 4 times spawned without waiting, printing 4 different calculated times in the console from the calculateWaitingTime function (in which the spawning happens)</p>
  
  <p>What is a good way to fix this?</p>