RuneHive-Game
Loading...
Searching...
No Matches
StatementDialogue.java
Go to the documentation of this file.
1package com.runehive.content.dialogue;
2
3/**
4 * The {@link Chainable} implementation that represents a dialogue with a single statement; which has no models on the dialogue.
5 *
6 * @author Seven
7 */
8public class StatementDialogue implements Chainable {
9
10 /** The text for this dialogue. */
11 private final String[] lines;
12
13 /**
14 * Creates a new {@link StatementDialogue}.
15 *
16 * @param lines The text for this dialogue.
17 */
18 public StatementDialogue(String... lines) {
19 this.lines = lines;
20 }
21
22 @Override
23 public void accept(DialogueFactory factory) { factory.sendStatement(this); }
24
25 /**
26 * Gets the text on this dialogue.
27 *
28 * @return The text.
29 */
30 public String[] getLines() {
31 return lines;
32 }
33
34}
Represents a factory class that contains important functions for building dialogues.
final DialogueFactory sendStatement(String... lines)
Appends a StatementDialogue to the current dialogue chain.
final String[] lines
The text for this dialogue.
String[] getLines()
Gets the text on this dialogue.
StatementDialogue(String... lines)
Creates a new StatementDialogue.
The chain-able itemcontainer that allows implementing dialogue factories the ability to chain togethe...