Game Development Reference
In-Depth Information
This will ensure the _physicsNode.position is updated according to the player's
initial position before the scene is rendered for the first time. If you run the game now and
restart or exit to the main menu via the pause menu, the screen will be centered on the
player immediately. This will be particularly noticeable when presenting the GameScene
with a transition.
Tip Sometimes such inconsistencies or visual glitches in the first or first couple
frames of a scene can't be avoided. In that case, you could start the scene with a
full-screen popover presented, perhaps one that uses the exact same background
as the preceding loading scene so that the user won't even notice the difference.
Then just fade out or remove the popover menu after a few frames have been
drawn, using a Callbacks keyframe in the popover's Default Timeline.
Summary
You can now pause the game and kill the player. Both actions present a popover menu to
restart and exit the level or, in the case of the pause menu, resume the game with a ready
animation. There were a number of cool tricks dispersed throughout this chapter as well.
The project at this stage of the topic is also found in the topic's downloadable archive in
the 07 - Popover Menus folder.
Search WWH ::




Custom Search