Hi I am currenltly learning swift and following a tutorial to make a Flappy Bird Game,
There is one change I would like to make which is I want the pipes to spawn from the left to right rather than the right to left.
What would be the best way to be able to do so? I tried to change the SKAction to "distanceToMove" by taking away the negative but once I do that, no pipes spawn at all. (line 131)
Many thanks in advance!
/
pipeTextureUp = SKTexture(imageNamed: "PipeUp")
pipeTextureUp.filteringMode = .nearest
pipeTextureDown = SKTexture(imageNamed: "PipeDown")
pipeTextureDown.filteringMode = .nearest
/
let distanceToMove = CGFloat(self.frame.size.width + 2.0 * pipeTextureUp.size().width)
let movePipes = SKAction.moveBy(x: -distanceToMove, y:0.0, duration:TimeInterval(0.008 * distanceToMove))
let removePipes = SKAction.removeFromParent()
movePipesAndRemove = SKAction.sequence([movePipes, removePipes])
/
let spawn = SKAction.run(spawnPipes)
let delay = SKAction.wait(forDuration: TimeInterval(1.5))
let spawnThenDelay = SKAction.sequence([spawn, delay])
spawnThenDelayForever = SKAction.repeatForever(spawnThenDelay)
pipeSlaveNode.run(spawnThenDelayForever)