Game Development Reference
In-Depth Information
Figure 2-7 . The playerNode in the middle of the scene
Make one more position change before you move on. Change playerNode 's position
using the following line of code:
playerNode!.position = CGPoint(x: size.width, y:
size.height)
As you can see, the new position is set to the maximum (x, y) of the viewable area in the
scene. Run the app in the simulator again. You will see your player in the upper-right
corner of your scene, as shown in Figure 2-8 .
Search WWH ::




Custom Search