Ejemplo n.º 1
0
        /// <summary>
        /// Event that is called when a button is pressed.
        /// </summary>
        /// <param name="sender"> The object</param>
        /// <param name="e"> The Button Pressed Event argument</param>
        private void OnButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            // Check if the button is the Menu key and there is no menu
            if (e.Button.Equals(Config.OpenGlamMenuKey) && Game1.activeClickableMenu is null)
            {
                // Take a Snapshot
                Menu.TakeSnapshot();

                // Change player direction and open the menu
                ChangePlayerDirection();
            }

            // Check if the user clicked on the dresser
            Dresser.DresserInteractCheck(e.Button);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Event that is called when a button is pressed.
        /// </summary>
        /// <param name="sender"> The object</param>
        /// <param name="e"> The Button Pressed Event argument</param>
        private void OnButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            // Check if the button is the Menu key and there is no menu
            if (e.Button.Equals(Config.OpenGlamMenuKey) && Game1.activeClickableMenu is null)
            {
                Menu.TakeSnapshot();
                ChangePlayerDirection();
                OpenGlamMenu();
            }

            Dresser.DresserInteractCheck(e.Button);

            if (IsJsonAssetsInstalled)
            {
                DresserJson.CheckJsonInput(sender, e);
            }
        }
Ejemplo n.º 3
0
        /// <summary>Event that is called when a button is pressed.</summary>
        /// <param name="sender">The object</param>
        /// <param name="e">The Button Pressed Event argument</param>
        private void OnButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            //Check if the button is the Menu key and their is no menu
            if (e.Button.Equals(Config.OpenGlamMenuKey) && Game1.activeClickableMenu is null)
            {
                //Take a Snapshot
                Menu.TakeSnapshot();

                //Change player direction and open the menu
                Game1.player.faceDirection(2);
                Game1.player.FarmerSprite.StopAnimation();
                Game1.player.completelyStopAnimatingOrDoingAction();
                Game1.activeClickableMenu = Menu;
            }

            //Check if the user clicked on the dresser
            Dresser.DresserInteractCheck(e.Button);
        }