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); } } }
public virtual void Close(DialogChoice choice) { IsOpen = false; OnClose.Invoke(choice); gameObject.SetActive(false); }