private void SelectionUI_ChoiceSelected(TouchpadSelectionChoice choice) { if (!selectionUI.gameObject.activeSelf) { return; // Ignore if disabled } SetUIEnabled(false); // Switch dialogue act dialogueMgr.TriggerResponse((int)choice.Data); // Data stores response Id }
private void TrackedController_PadClicked(object sender, ClickedEventArgs e) { TouchpadSelectionChoice choice = GetSelectedChoice(); if (choice && choice.Active) { // Fire events choice_SelectedEvents.Invoke(choice); ChoiceSelected(choice); } }
// Update is called once per frame void Update() { if (isTouching) { TouchpadSelectionChoice choice = GetSelectedChoice(); if (choice != prevChoice) // Has the choice changed? { // Clear choices and re-select SetAllSelected(false); choice.Selected = true; prevChoice = choice; } } }
private void SelectionUI_ChoiceSelected(TouchpadSelectionChoice choice) { // Switch dialogue act dialogueMgr.TriggerResponse((int)choice.Data); // Data stores response Id }
private void TrackedController_PadTouched(object sender, ClickedEventArgs e) { prevChoice = null; isTouching = true; }