Ejemplo n.º 1
0
        public override void Update()
        {
            //if (IsActive)
            Warcraft.camera.Update();

            if (start)
            {
                managerPlayerUnits.Update();
                if (Battleship.move)
                {
                    increment += 1;

                    if (fadeOut < 0.8f)
                    {
                        fadeOut += (float)Math.Pow(1.05, increment) / 100;
                    }

                    if (fadeOut > 0.6)
                    {
                        managerMouse.Update();
                        showSummary = true;
                    }
                }
                else
                {
                    managerMouse.Update();
                    managerPlayerBuildings.Update();
                    managerUI.Update();
                    managerEnemies.Update();

                    managerCombat.Update();
                }
            }
            else
            {
                managerMouse.Update();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }



            _managerMouse.Update();
            _managerUnits.Update();
            // TODO: Add your update logic here

            base.Update(gameTime);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            // TODO: Add your update logic here
            _mouse.Update(gameTime.ElapsedGameTime.Milliseconds);
            _map.Update(gameTime.ElapsedGameTime.Milliseconds);
            _managerInput.Update(gameTime.ElapsedGameTime.Milliseconds);
            _managerCamera.Update(gameTime.ElapsedGameTime.Milliseconds);

            base.Update(gameTime);
        }
Ejemplo n.º 4
0
        protected override void Update(GameTime gameTime)
        {
            if (Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            managerMouse.Update();
            managerUnits.Update();
            managerEnemies.Update();
            managerBuildings.Update();
            managerUI.Update();

            managerCombat.Update();

            if (IsActive)
            {
                camera.Update(gameTime);
            }

            base.Update(gameTime);
        }