Skip to main content
edited title
Link
user1430
user1430

Xcode clouds respawning How can I make background elements wrap around the screen?

Heey. For first, Iam from Slovakia so sorry if i made some mistakes in language. I have got a question about making "repeated" movement in Xcode. I just needI'm looking to do movement like on a picture. I already have a code of movingmake my clouds but whenwrap around the cloud reachscreen in my game (like the edge of ;"display"picture).

enter image description here

Right now it just qoes out of a "display" and I Just want to do know code which allows me respawning clouds at the other side just like atcontinues off the starting positionscreen. I hope u understand me :D enter image description here And this is a code which allows me do aThe current movement code is: Cloud.center = CGPointMake(Cloud.center.x +0.032, Cloud.center.y)

Cloud.center = CGPointMake(Cloud.center.x +0.032, Cloud.center.y)

Heey. For first, Iam from Slovakia so sorry if i made some mistakes in language. I have got a question about making "repeated" movement in Xcode. I just need to do movement like on a picture. I already have a code of moving clouds but when the cloud reach the edge of ;"display" it just qoes out of a "display" and I Just want to do know code which allows me respawning clouds at the other side just like at the starting position. I hope u understand me :D enter image description here And this is a code which allows me do a movement: Cloud.center = CGPointMake(Cloud.center.x +0.032, Cloud.center.y)

I'm looking to make my clouds wrap around the screen in my game (like the picture).

enter image description here

Right now it just continues off the screen. The current movement code is:

Cloud.center = CGPointMake(Cloud.center.x +0.032, Cloud.center.y)
Source Link

Xcode clouds respawning

Heey. For first, Iam from Slovakia so sorry if i made some mistakes in language. I have got a question about making "repeated" movement in Xcode. I just need to do movement like on a picture. I already have a code of moving clouds but when the cloud reach the edge of ;"display" it just qoes out of a "display" and I Just want to do know code which allows me respawning clouds at the other side just like at the starting position. I hope u understand me :D enter image description here And this is a code which allows me do a movement: Cloud.center = CGPointMake(Cloud.center.x +0.032, Cloud.center.y)