Beispiel #1
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);
        }
Beispiel #2
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();
            }
        }