Interface IDialogActions
Represents a sequence of actions that can be performed after a dialog choice.
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IDialogActions
Properties
| Improve this Doc View SourceActions
Gets the actions.
Declaration
IList<IDialogAction> Actions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<IDialogAction> | The actions. |
Methods
| Improve this Doc View SourceAddActions(IDialogAction[])
Adds a list of dialog actions.
Declaration
void AddActions(params IDialogAction[] actions)
Parameters
Type | Name | Description |
---|---|---|
IDialogAction[] | actions | Actions. |
AddActions(Action[])
Adds a list of actions
Declaration
void AddActions(params Action[] actions)
Parameters
Type | Name | Description |
---|---|---|
System.Action[] | actions | Actions. |
AddAsyncActions(Func<Task>[])
Adds a list of asynchronous actions.
Declaration
void AddAsyncActions(params Func<Task>[] actions)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Threading.Tasks.Task>[] | actions | Actions. |
AddAsyncConditionalActions(Func<Task<Boolean>>[])
Adds a list of asynchronous actions that may cancel the sequence.
Declaration
void AddAsyncConditionalActions(params Func<Task<bool>>[] actions)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Threading.Tasks.Task<System.Boolean>>[] | actions | Actions. |
AddConditionalActions(Func<Boolean>[])
Adds a list of actions that may cancel the sequence.
Declaration
void AddConditionalActions(params Func<bool>[] actions)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Boolean>[] | actions | Actions. |
AddPlayerText(String[])
Adds an action for saying text by the player.
Declaration
void AddPlayerText(params string[] sentences)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | sentences | The list of sentences that the player will say one by one. |
AddText(ICharacter, String[])
Adds an action for saying text by a character.
Declaration
void AddText(ICharacter character, params string[] sentences)
Parameters
Type | Name | Description |
---|---|---|
ICharacter | character | The speaking character. |
System.String[] | sentences | The list of sentences that the character will say one by one. |
RunAsync()
Runs the actions list asynchronously, one by one.
Declaration
Task<bool> RunAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if all the actions were executed, false if the sequence was cancelled. |