示例#1
0
    private void OnSpeechBubble(YEO_TALK_EVENT eventData)
    {
        Debug.Log(eventData.message);

        UIBubblePopupData testPopup = new UIBubblePopupData();

        testPopup.Title = "Change Hat";
        testPopup.Body  = eventData.message;

        testPopup.BubblePos = Vector3.zero;

        List <UIPopupButtonData> buttonData = new List <UIPopupButtonData>();

        buttonData.Add(new UIBubbleButtonData {
            Text = "Change it", Selection = PopupSelection.Okay, Button = InputButton.A
        });
        buttonData.Add(new UIBubbleButtonData {
            Text = "Keep yours", Selection = PopupSelection.Cancel, Button = InputButton.B
        });

        testPopup.ButtonData = buttonData;
        testPopup.Callback   = (PopupSelection s, object data) => { if (s == PopupSelection.Okay)
                                                                    {
                                                                        Debug.Log("POPUP one CLOSED"); ClosePopup();
                                                                    }
        };

        UIManager.Instance.QueuePopup(testPopup);
    }
示例#2
0
 public void OnTalkInteraction(YEO_TALK_EVENT eventData)
 {
     m_NewsWindow.AddNewNewsEntry("You talked to someone, they said; " + eventData.message + '"');
 }
 private void OnSpeechBubble(YEO_TALK_EVENT eventData)
 {
     Debug.Log(eventData.message);
 }