/// <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()
        {
            // Initialize Camera
            camera = new Camera(this, new Vector3(0, 0, 50),
                Vector3.Zero, Vector3.Up);
            Components.Add(camera);

            // Initialize model manager
            modelManager = new ModelManager(this);
            Components.Add(modelManager);

            base.Initialize();
        }
Exemplo n.º 2
0
        /// <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();
        }
Exemplo n.º 3
0
        /// <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();
        }
Exemplo n.º 4
0
        /// <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()
        {
            // TODO: Add your initialization logic here
            camera = new Camera(this, new Vector3(0, 0, 50),
                Vector3.Zero, Vector3.Up);
            Components.Add(camera);

            modelManager = new ModelManager(this);
            Components.Add(modelManager);
            camera.addModelManager(modelManager);
            soundManager = new SoundManager();
            modelManager.setSoundManager(soundManager);

            debug = new Developer_Debug_Menu(this);

            oldState = Keyboard.GetState();
            oldGamepadState = GamePad.GetState(PlayerIndex.One);

            modelManager.Enabled = false;
            modelManager.Visible = false;

            //Splash screen component
            splashScreen = new SplashScreen(this);
            Components.Add(splashScreen);
            splashScreen.setSoundManager(soundManager);

            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()
        {
            // Create viewports
            Viewport vp1 = GraphicsDevice.Viewport;
            Viewport vp2 = GraphicsDevice.Viewport;
            vp1.Height = (GraphicsDevice.Viewport.Height / 2);

            vp2.Y = vp1.Height;
            vp2.Height = vp1.Height;

            // Add camera components
            camera1 = new Camera(this, new Vector3(0, 0, 50),
                Vector3.Zero, Vector3.Up, vp1);
            Components.Add(camera1);

            camera2 = new Camera(this, new Vector3(0, 0, -50),
                Vector3.Zero, Vector3.Up, vp2);
            Components.Add(camera2);

            // Initialize model manager
            modelManager = new ModelManager(this);
            Components.Add(modelManager);

            base.Initialize();
        }
Exemplo n.º 6
0
 public void setModelManager(ModelManager m)
 {
     myModelManager = m;
 }