This is an implementation of IDialogueUI that uses the participants' bark UIs to run a conversation. More...
Public Member Functions | |
void | Open () |
Called when a conversation starts, use Open() to do any setup – for example, to show the conversation GUI controls. More... | |
void | Close () |
Called when a conversation ends, use Close() to clean up – for example, to hide the conversation GUI controls. More... | |
void | ShowSubtitle (Subtitle subtitle) |
Shows a subtitle. More... | |
void | HideSubtitle (Subtitle subtitle) |
Hides a subtitle. More... | |
void | ShowResponses (Subtitle subtitle, Response[] responses, float timeout) |
Shows the player response menu. More... | |
void | HideResponses () |
Hides the player response menu. More... | |
void | ShowQTEIndicator (int index) |
Shows a QTE (Quick Time Event) indicator. More... | |
void | HideQTEIndicator (int index) |
Hides a QTE (Quick Time Event) indicator. More... | |
void | ShowAlert (string message, float duration) |
Shows an alert message. More... | |
void | HideAlert () |
Hides the alert message if it's showing. More... | |
Events | |
EventHandler< SelectedResponseEventArgs > | SelectedResponseHandler |
Events inherited from PixelCrushers.DialogueSystem.IDialogueUI | |
EventHandler< SelectedResponseEventArgs > | SelectedResponseHandler |
Your implementation must define this event and make it public. More... | |
This is an implementation of IDialogueUI that uses the participants' bark UIs to run a conversation.
Since it uses bark UIs, there's no response menu. Instead, if there are multiple player responses, it automatically chooses the first one.
void PixelCrushers.DialogueSystem.BarkDialogueUI.Close | ( | ) |
Called when a conversation ends, use Close() to clean up – for example, to hide the conversation GUI controls.
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.HideAlert | ( | ) |
Hides the alert message if it's showing.
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.HideQTEIndicator | ( | int | index | ) |
Hides a QTE (Quick Time Event) indicator.
index | Index number of the QTE indicator. |
If your project doesn't use QTEs, you can just create an empty method.
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.HideResponses | ( | ) |
Hides the player response menu.
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.HideSubtitle | ( | Subtitle | subtitle | ) |
Hides a subtitle.
subtitle | The subtitle to hide. |
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.Open | ( | ) |
Called when a conversation starts, use Open() to do any setup – for example, to show the conversation GUI controls.
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.ShowAlert | ( | string | message, |
float | duration | ||
) |
Shows an alert message.
The dialogue system will not call Open() before ShowAlert(), nor Close() afterward, since alert messages are intended to be shown outside of conversations.
message | The message to show. |
duration | The duration in seconds to show the message. |
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.ShowQTEIndicator | ( | int | index | ) |
Shows a QTE (Quick Time Event) indicator.
index | Index number of the QTE indicator. |
If your project doesn't use QTEs, you can just create an empty method.
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.ShowResponses | ( | Subtitle | subtitle, |
Response[] | responses, | ||
float | timeout | ||
) |
Shows the player response menu.
When the player selects a response, your implementation must call the SelectedResponseHandler event and pass along a SelectedResponseEventArgs object containing the selected response.
Example: private void OnResponseClicked(Response response) { SelectedResponseHandler(this, new SelectedResponseEventArgs(response)); }
subtitle | The most recently displayed subtitle. Your implementation might show this subtitle to remind the player what he or she is responding to. |
responses | The responses. |
timeout | If not 0 , the duration in seconds that the player has to choose a response; otherwise the currently-focused response is auto-selected. If no response is focused (e.g., hovered over), the first response is auto-selected. If 0 , there is no timeout; the player can take as long as desired to choose a response. |
Implements PixelCrushers.DialogueSystem.IDialogueUI.
void PixelCrushers.DialogueSystem.BarkDialogueUI.ShowSubtitle | ( | Subtitle | subtitle | ) |
Shows a subtitle.
subtitle | The subtitle to show. Subtitles contain information such as the player type (PC or NPC), portrait texture, and the formatted text of the line. |
Implements PixelCrushers.DialogueSystem.IDialogueUI.
EventHandler<SelectedResponseEventArgs> PixelCrushers.DialogueSystem.BarkDialogueUI.SelectedResponseHandler |