I want to Create a endless scrolling background for my spritekit game, iT should consist of one or two images probably, which repeat themselves? I found these one and two exampl
You don´t need all that.
Just use this function with the vars that you declared and the attributes that you used in didMoveToView.
func backgroudScrollUpdate(){
background1.position = CGPointMake(background1.position.x, background1.position.y - 1)
background2.position = CGPointMake(background1.position.x, background2.position.y - 1)
if background1.position.y == -UIScreen.mainScreen().bounds.height{
background1.position = CGPointMake(0, 0)
background2.position = CGPointMake(0, 0 + UIScreen.mainScreen().bounds.height)
}
}
Then just call it in your update method.
Of course, it is not the best way since it is readable for two images, when you have more go for a loop.