Game Development Reference
In-Depth Information
foregroundNode!.position
= CGPointMake(foregroundNode!.position.x,
-(playerNode!.position.y - 180.0));
}
}
Once you have made all of these changes, run the app again and admire your handwork.
You should now see a planet resting at the bottom of the scene and the playerNode
standing on top of it. Tap the screen a few times. The planet and the background will
move together, giving the impression that the playerNode is flying off the planet's sur-
face and into space. Figure 5-5 shows the new scene.
Figure 5-5 . A planet's surface added to the scene
Search WWH ::




Custom Search