Beispiel #1
0
        public void OnClickAction(SAction action)
        {
            if (IsVisible())
            {
                if (action != null && select != null && character != null)
                {
                    character.FaceTorward(interact_pos);

                    if (action.CanDoAction(character, select))
                    {
                        action.DoAction(character, select);
                    }

                    Hide();
                }
            }
        }
        public void OnClickAction(SAction action)
        {
            if (IsVisible())
            {
                PlayerCharacter character = GetPlayer();
                if (action != null && slot != null && character != null)
                {
                    ItemSlot aslot = slot;

                    PlayerUI.Get(character.player_id)?.CancelSelection();
                    Hide();

                    if (action.CanDoAction(character, aslot))
                    {
                        action.DoAction(character, aslot);
                    }
                }
            }
        }
 public void SetButton(SAction action)
 {
     this.action = action;
     title.text  = action.title;
     gameObject.SetActive(true);
 }