Mediates between a ConversationModel (data) and ConversationView (user interface) to run a conversation.
More...
Mediates between a ConversationModel (data) and ConversationView (user interface) to run a conversation.
◆ ConversationController()
Initializes a new ConversationController and starts the conversation in the model.
Also sends OnConversationStart messages to the participants.
- Parameters
-
model | Data model of the conversation. |
view | View to use to provide a user interface for the conversation. |
endConversationHandler | Handler to call to inform when the conversation is done. |
◆ Close()
void PixelCrushers.DialogueSystem.ConversationController.Close |
( |
| ) |
|
|
inline |
Closes the currently-running conversation, which also sends OnConversationEnd messages to the participants.
◆ EndConversationDelegate()
delegate void PixelCrushers.DialogueSystem.ConversationController.EndConversationDelegate |
( |
ConversationController |
ConversationController | ) |
|
◆ GotoCurrentResponse()
void PixelCrushers.DialogueSystem.ConversationController.GotoCurrentResponse |
( |
| ) |
|
|
inline |
Follows a response that has been set as the current response by SetCurrentResponse.
◆ GotoFirstResponse()
void PixelCrushers.DialogueSystem.ConversationController.GotoFirstResponse |
( |
| ) |
|
|
inline |
Follows the first PC response in the current state.
◆ GotoLastResponse()
void PixelCrushers.DialogueSystem.ConversationController.GotoLastResponse |
( |
| ) |
|
|
inline |
Follows the last PC response in the current state.
◆ GotoRandomResponse()
void PixelCrushers.DialogueSystem.ConversationController.GotoRandomResponse |
( |
| ) |
|
|
inline |
Follows a random PC response in the current state.
◆ GotoState()
void PixelCrushers.DialogueSystem.ConversationController.GotoState |
( |
ConversationState |
state | ) |
|
|
inline |
Goes to a conversation state.
If the state is null
, the conversation ends.
- Parameters
-
◆ OnFinishedSubtitle()
void PixelCrushers.DialogueSystem.ConversationController.OnFinishedSubtitle |
( |
object |
sender, |
|
|
EventArgs |
e |
|
) |
| |
|
inline |
Handles the finished subtitle event.
If the current conversation state has an NPC response, the conversation proceeds to that response. Otherwise, if the current state has PC responses, then the response menu is shown (or if it has a single auto-response, the conversation proceeds directly to that response). If there are no responses, the conversation ends.
- Parameters
-
sender | Sender. |
e | Event args. |
◆ OnSelectedResponse()
Handles the selected response event by proceeding to the state associated with the selected response.
- Parameters
-
sender | Sender. |
e | Selected response event args. |
◆ SetActorPortraitTexture()
void PixelCrushers.DialogueSystem.ConversationController.SetActorPortraitTexture |
( |
string |
actorName, |
|
|
Texture2D |
portraitTexture |
|
) |
| |
|
inline |
Sets the portrait texture to use in the UI for an actor.
This is used when the SetPortrait() sequencer command changes an actor's image.
- Parameters
-
actorName | Actor name. |
portraitTexture | Portrait texture. |
◆ SetCurrentResponse()
void PixelCrushers.DialogueSystem.ConversationController.SetCurrentResponse |
( |
Response |
response | ) |
|
|
inline |
Sets the current response, which can be used by GotoCurrentResponse.
Typically only used if the dialogue UI's timeout action specifies to select the current response.
- Parameters
-
◆ UpdateResponses()
void PixelCrushers.DialogueSystem.ConversationController.UpdateResponses |
( |
| ) |
|
|
inline |
◆ actorInfo
CharacterInfo? PixelCrushers.DialogueSystem.ConversationController.actorInfo |
|
get |
Gets the actor info for this conversation.
The actor info.
◆ conversantInfo
CharacterInfo? PixelCrushers.DialogueSystem.ConversationController.conversantInfo |
|
get |
Gets the conversant info for this conversation.
The conversant info.
◆ conversationModel
ConversationModel PixelCrushers.DialogueSystem.ConversationController.conversationModel |
|
get |
◆ conversationView
ConversationView PixelCrushers.DialogueSystem.ConversationController.conversationView |
|
get |
◆ isActive
bool PixelCrushers.DialogueSystem.ConversationController.isActive |
|
get |
Indicates whether the ConversationController is currently running a conversation.
true
if a conversation is active; false
if the conversation is done.
◆ isDialogueEntryValid
Gets or sets the IsDialogueEntryValid delegate.
◆ randomizeNextEntry
bool PixelCrushers.DialogueSystem.ConversationController.randomizeNextEntry |
|
getset |
Set true to choice randomly from the next list of valid NPC subtitles instead of using the first one in the list.
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/LoveHate/Dev/Source/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Model-View-Controller/Controller/ConversationController.cs