December 2004
Beginner
432 pages
10h 17m
English
Before you start writing any code to hook things together, you need to make sure that you have the required variables and constants declared. Add the declarations from Listing 17.1 to your game engine class.
// Constants for starting locations and rotations within the levels private static readonly Vector3 Player1StartLocation = new Vector3(-2600,0,-2600); private static readonly Vector3 Player2StartLocation = new Vector3(2600,0,2600); private const float Player1StartRotation = (float)Math.PI / 4.0f; private const float Player2StartRotation = (float)Math.PI + (float)Math.PI / 4.0f; // Store the sky box private Skybox worldSky = null; // Store the level private Level worldLevel = null; ... |
Read now
Unlock full access