/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { camera = new Camera(this, new Vector3(0, 0, 50), Vector3.Zero, Vector3.Up); Components.Add(camera); //Intilize the Model manager modelManager = new ModelManager(this); Components.Add(modelManager); modelManager.Enabled = false; modelManager.Visible = false; //Splash screen component splashScreen = new SplashScreen(this); Components.Add(splashScreen); splashScreen.SetData("Welcome to space Defender!", currentGameState); base.Initialize(); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { //Intialize the video player // vidPlayer = new VideoPlayer(); camera = new Camera(this, new Vector3(0, 0, 50), Vector3.Zero, Vector3.Up); Components.Add(camera); //Intilize the Model manager modelManager = new ModelManager(this); Components.Add(modelManager); modelManager.Enabled = false; modelManager.Visible = false; //Splash screen component splashScreen = new SplashScreen(this); Components.Add(splashScreen); splashScreen.SetData("Welcome to space Defender!", currentGameState); splashScreen.Visible = false; //start menu startMenu = new StartMenu(this); Components.Add(startMenu); //about page about = new About(this); Components.Add(about); about.Visible = false; about.Enabled = false; //instructions page instructions = new Instructions(this); Components.Add(instructions); instructions.Visible = false; instructions.Enabled = false; base.Initialize(); }