DialogueEvent class
Structured event describing something that happened in a dialogue, for a game to put on its own event bus. The engine does not emit these itself.
Constructors
-
DialogueEvent({required DialogueEventType type, String? graphId, String? nodeTitle, DialogueLine? line, List<
DialogueChoice> ? choices, int? choiceIndex, String? commandName, List<String> ? commandArgs}) -
An event of
type; fill in the fields thattypesays apply, leave the rest null.const
Properties
- choiceIndex → int?
-
Index of the selected choice, when type is
DialogueEventType.choiceSelected.
final
-
choices
→ List<
DialogueChoice> ? -
Resolved choices, when type is DialogueEventType.choicesPresented.
final
-
commandArgs
→ List<
String> ? -
Command arguments, when type is DialogueEventType.commandExecuted.
final
- commandName → String?
-
Command name, when type is DialogueEventType.commandExecuted.
final
- graphId → String?
-
ID of the DialogueGraph involved.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- line → DialogueLine?
-
Resolved line, when type is DialogueEventType.linePresented.
final
- nodeTitle → String?
-
Node title where the event occurred.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → DialogueEventType
-
What happened, which says which of the other fields are set.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited