Example #1
0
 private AsteroidField InitializeField()
 {
     field           = new AsteroidField(Game, camera, 100.0f, hud);
     field.DrawOrder = 1;
     Game.Components.Add(field);
     return(field);
 }
Example #2
0
        private void InitializeCamera()
        {
            Vector3 position  = new Vector3(0, 40, 5);
            Vector3 direction = new Vector3(0, 0, -1);

            camera           = new SpaceCamera(Game, direction, Vector3.Up, position);
            camera.DrawOrder = 2;

            Game.Components.Add(camera);
            Game.Services.AddService(typeof(Camera), camera);
            AsteroidField field = InitializeField();
        }