Ejemplo n.º 1
0
 protected override void OnMouseClick()
 {
     if (IsDisabled)
     {
         return;
     }
     Game1.playSound("bigSelect");
     Prestige.AddPrestigeProfession(Profession.Id);
     Selected = true;
 }
        /// <summary>Raised after the player presses a button on the keyboard, controller, or mouse.</summary>
        /// <param name="e">The event data.</param>
        /// <param name="isClick">Whether the button press is a click.</param>
        public override void OnButtonPressed(ButtonPressedEventArgs e, bool isClick)
        {
            base.OnButtonPressed(e, isClick);
            if (IsDisabled)
            {
                return;
            }

            if (isClick && IsHovered)
            {
                Game1.playSound("bigSelect");
                Prestige.AddPrestigeProfession(Profession.Id);
                Selected = true;
            }
        }