Exemplo n.º 1
0
        public void Select(DialogChoiceObject dialogChoiceObject)
        {
            if (EventSystem.current != null)
            {
                EventSystem.current.SetSelectedGameObject(SelectedChoiceObject.gameObject);
            }

            if (dialogChoiceObject == SelectedChoiceObject)
            {
                return;
            }

            SelectedChoiceObject = dialogChoiceObject;
            OnChangeSelection.Invoke(SelectedChoiceObject.Choice);

            if (Animator != null)
            {
                if (SelectionIndexIntHash != 0)
                {
                    Animator.SetInteger(SelectionIndexIntHash, DialogChoiceObjects.IndexOf(dialogChoiceObject));
                }

                if (ChangeSelectionTriggerHash != 0)
                {
                    Animator.SetTrigger(ChangeSelectionTriggerHash);
                }
            }
        }
Exemplo n.º 2
0
 public virtual void Close(DialogChoice choice)
 {
     IsOpen = false;
     OnClose.Invoke(choice);
     gameObject.SetActive(false);
 }