|
| DialogueFactory (Player player) |
final DialogueFactory | sendDialogue (Dialogue dialogue) |
final DialogueFactory | onAction (Runnable action) |
DialogueFactory | onNext () |
final DialogueFactory | executeOption (int type, Optional< OptionDialogue > result) |
void | clear () |
final Queue< Chainable > | getChain () |
boolean | isOption () |
final DialogueFactory | execute () |
final DialogueFactory | sendPlayerChat (String... lines) |
final DialogueFactory | sendPlayerChat (Expression expression, String... lines) |
final DialogueFactory | sendNpcChat (int id, String... lines) |
final DialogueFactory | sendNpcChat (int id, Expression expression, String... lines) |
final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2) |
final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2, String option3, Runnable action3) |
final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2, String option3, Runnable action3, String option4, Runnable action4) |
final DialogueFactory | sendOption (String option1, Runnable action1, String option2, Runnable action2, String option3, Runnable action3, String option4, Runnable action4, String option5, Runnable action5) |
final DialogueFactory | sendStatement (String... lines) |
Player | getPlayer () |
Optional< Runnable > | getNextAction () |
void | setNextAction (Optional< Runnable > nextAction) |
/**
Definition at line 56 of file DialogueFactory.java.
◆ DialogueFactory()
com.osroyale.content.dialogue.DialogueFactory.DialogueFactory |
( |
Player | player | ) |
|
|
inline |
◆ clear()
void com.osroyale.content.dialogue.DialogueFactory.clear |
( |
| ) |
|
|
inline |
Clears the current dialogue chain
.
- Returns
- The instance of this factory.
Definition at line 152 of file DialogueFactory.java.
◆ execute()
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.execute |
( |
| ) |
|
|
inline |
Retrieves the next dialogue in the chain and executes it.
- Returns
- The instance of this factory.
Definition at line 196 of file DialogueFactory.java.
◆ executeOption()
Executes an result
for a player
.
- Parameters
-
type | The type of option. |
result | The option to execute. |
Definition at line 133 of file DialogueFactory.java.
◆ getChain()
final Queue< Chainable > com.osroyale.content.dialogue.DialogueFactory.getChain |
( |
| ) |
|
|
inline |
◆ getNextAction()
Optional< Runnable > com.osroyale.content.dialogue.DialogueFactory.getNextAction |
( |
| ) |
|
|
inline |
Gets the Optional
describing the next action in the dialogue chain.
- Returns
- The optional describing the next action.
Definition at line 678 of file DialogueFactory.java.
◆ getPlayer()
Player com.osroyale.content.dialogue.DialogueFactory.getPlayer |
( |
| ) |
|
|
inline |
◆ isOption()
boolean com.osroyale.content.dialogue.DialogueFactory.isOption |
( |
| ) |
|
|
inline |
◆ onAction()
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.onAction |
( |
Runnable | action | ) |
|
|
inline |
Sets an action
so this action can be executed after dialogues are done.
- Parameters
-
- Returns
- The instance of this factory.
Definition at line 103 of file DialogueFactory.java.
◆ onNext()
Accepts the next dialogue in the chain.
- Returns
- The instance of this factory.
Definition at line 117 of file DialogueFactory.java.
◆ sendDialogue()
Sends a player a dialogue.
- Parameters
-
dialogue | The dialogue to sent. |
Definition at line 90 of file DialogueFactory.java.
◆ sendNpcChat() [1/2]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendNpcChat |
( |
int | id, |
|
|
Expression | expression, |
|
|
String... | lines ) |
|
inline |
Appends an NpcDialogue
to the current dialogue chain.
- Parameters
-
id | The id of this npc. |
expression | The expression of this npc. |
lines | The text of this dialogue. |
- Returns
- The instance of this factory.
Definition at line 345 of file DialogueFactory.java.
◆ sendNpcChat() [2/2]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendNpcChat |
( |
int | id, |
|
|
String... | lines ) |
|
inline |
Appends an NpcDialogue
to the current dialogue chain.
- Parameters
-
id | The id of this npc. |
lines | The text of this dialogue. |
- Returns
- The instance of this factory.
Definition at line 333 of file DialogueFactory.java.
◆ sendOption() [1/4]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendOption |
( |
String | option1, |
|
|
Runnable | action1, |
|
|
String | option2, |
|
|
Runnable | action2 ) |
|
inline |
Appends the OptionDialogue
onto the current dialogue chain.
- Parameters
-
option1 | The text for the first option. |
action1 | The action for the first action. |
option2 | The text for the second option. |
action2 | The action for the second action. |
Definition at line 413 of file DialogueFactory.java.
◆ sendOption() [2/4]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendOption |
( |
String | option1, |
|
|
Runnable | action1, |
|
|
String | option2, |
|
|
Runnable | action2, |
|
|
String | option3, |
|
|
Runnable | action3 ) |
|
inline |
Appends the OptionDialogue
onto the current dialogue chain.
- Parameters
-
option1 | The text for the first option. |
action1 | The action for the first action. |
option2 | The text for the second option. |
action2 | The action for the second action. |
option3 | The text for the third option. |
action3 | The action for the third action. |
Definition at line 427 of file DialogueFactory.java.
◆ sendOption() [3/4]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendOption |
( |
String | option1, |
|
|
Runnable | action1, |
|
|
String | option2, |
|
|
Runnable | action2, |
|
|
String | option3, |
|
|
Runnable | action3, |
|
|
String | option4, |
|
|
Runnable | action4 ) |
|
inline |
Appends the OptionDialogue
onto the current dialogue chain.
- Parameters
-
option1 | The text for the first option. |
action1 | The action for the first action. |
option2 | The text for the second option. |
action2 | The action for the second action. |
option3 | The text for the third option. |
action3 | The action for the third action. |
option4 | The text for the four option. |
action4 | The action for the four action. |
Definition at line 443 of file DialogueFactory.java.
◆ sendOption() [4/4]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendOption |
( |
String | option1, |
|
|
Runnable | action1, |
|
|
String | option2, |
|
|
Runnable | action2, |
|
|
String | option3, |
|
|
Runnable | action3, |
|
|
String | option4, |
|
|
Runnable | action4, |
|
|
String | option5, |
|
|
Runnable | action5 ) |
|
inline |
Appends the OptionDialogue
onto the current dialogue chain.
- Parameters
-
option1 | The text for the first option. |
action1 | The action for the first action. |
option2 | The text for the second option. |
action2 | The action for the second action. |
option3 | The text for the third option. |
action3 | The action for the third action. |
option4 | The text for the four option. |
action4 | The action for the four action. |
option5 | The text for the fifth option. |
action5 | The action for the fifth action. |
Definition at line 461 of file DialogueFactory.java.
◆ sendPlayerChat() [1/2]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendPlayerChat |
( |
Expression | expression, |
|
|
String... | lines ) |
|
inline |
Appends a PlayerDialogue
to the current dialogue chain.
- Parameters
-
lines | The dialogue of the player talking. |
expression | The expression of this dialogue. |
- Returns
- The instance of this factory.
Definition at line 270 of file DialogueFactory.java.
◆ sendPlayerChat() [2/2]
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendPlayerChat |
( |
String... | lines | ) |
|
|
inline |
Appends a PlayerDialogue
to the current dialogue chain.
- Parameters
-
lines | The dialogue of the player talking. |
- Returns
- The instance of this factory.
Definition at line 259 of file DialogueFactory.java.
◆ sendStatement()
final DialogueFactory com.osroyale.content.dialogue.DialogueFactory.sendStatement |
( |
String... | lines | ) |
|
|
inline |
◆ setNextAction()
void com.osroyale.content.dialogue.DialogueFactory.setNextAction |
( |
Optional< Runnable > | nextAction | ) |
|
|
inline |
Sets the next action in the dialogue chain.
- Parameters
-
nextAction | The action to set. |
Definition at line 687 of file DialogueFactory.java.
The documentation for this class was generated from the following file: