Example #1
0
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            //mousePosition = map.Player.mousePosition;
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                this.Exit();
            }

            UpdateInput();
            //mousePosition.X = mouseState.X - screenCenter.X;
            //mousePosition.Y = mouseState.Y - screenCenter.Y;
            player.Update(gameTime, keyboardState, mouseState, screenCenter);//orientation);
            if (hoard != null)
            {
                hoard.Update(gameTime);
            }
            else
            {
                SpawnHoard();
            }
            projectileManager.Update(gameTime);
            //UpdateEnemies(gameTime);


            map.Update(gameTime, keyboardState, mouseState, screenCenter);//, Window.CurrentOrientation);

            base.Update(gameTime);
        }