Exemplo n.º 1
0
        /// <summary>
        /// This method handles clicking on character menu, leveling up, etc
        /// </summary>
        private void HandleMouse(GameTime gameTime)
        {
            if (currentMouseState.LeftButton == ButtonState.Pressed && previousMouseState.LeftButton == ButtonState.Released)
            {
                //should exit?
                if (characterMenu.GetExitArea().Contains((mousePos - Camera.ScreenOffset).ToPoint()))
                {
                    this.toRemove = true;
                }

                foreach (Attributes attr in Enum.GetValues(typeof(Attributes)))
                {
                    if (characterMenu.GetAttributeButtonArea(attr).Contains((mousePos - Camera.ScreenOffset).ToPoint()))
                    {
                        Game1.Player.ImproveAttribute(attr, 1);
                    }
                }
            }
        }