RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.dialogue.PlayerDialogue Class Reference

A Chainable implementation that represents a player talking. More...

Inheritance diagram for com.runehive.content.dialogue.PlayerDialogue:
Collaboration diagram for com.runehive.content.dialogue.PlayerDialogue:

Public Member Functions

void accept (DialogueFactory factory)
Expression getExpression ()
 Gets the expression of this player.
String[] getLines ()
 Gets the text for this dialogue.
 PlayerDialogue (Expression expression, String... lines)
 Creates a new PlayerDialogue.
 PlayerDialogue (String... lines)
 Creates a new PlayerDialogue with a default expression of DEFAULT.

Private Attributes

final Expression expression
 The expression of this player.
final String[] lines
 The text for this dialogue.

Detailed Description

A Chainable implementation that represents a player talking.

Author
Seven

Definition at line 8 of file PlayerDialogue.java.

Constructor & Destructor Documentation

◆ PlayerDialogue() [1/2]

com.runehive.content.dialogue.PlayerDialogue.PlayerDialogue ( String... lines)

Creates a new PlayerDialogue with a default expression of DEFAULT.

Parameters
linesThe text for this dialogue.

Definition at line 21 of file PlayerDialogue.java.

21 {
22 this(Expression.DEFAULT, lines);
23 }

References com.runehive.content.dialogue.Expression.DEFAULT, and lines.

◆ PlayerDialogue() [2/2]

com.runehive.content.dialogue.PlayerDialogue.PlayerDialogue ( Expression expression,
String... lines )

Creates a new PlayerDialogue.

Parameters
expressionThe expression for this dialogue.
linesThe text for this dialogue.

Definition at line 31 of file PlayerDialogue.java.

31 {
32 this.expression = expression;
33 this.lines = lines;
34 }

References expression, and lines.

Member Function Documentation

◆ accept()

void com.runehive.content.dialogue.PlayerDialogue.accept ( DialogueFactory factory)

Definition at line 55 of file PlayerDialogue.java.

55 {
56 factory.sendPlayerChat(this);
57 }

References com.runehive.content.dialogue.DialogueFactory.sendPlayerChat().

Here is the call graph for this function:

◆ getExpression()

Expression com.runehive.content.dialogue.PlayerDialogue.getExpression ( )

Gets the expression of this player.

Returns
The expression of this player.

Definition at line 41 of file PlayerDialogue.java.

41 {
42 return expression;
43 }

References expression.

◆ getLines()

String[] com.runehive.content.dialogue.PlayerDialogue.getLines ( )

Gets the text for this dialogue.

Returns
The text.

Definition at line 50 of file PlayerDialogue.java.

50 {
51 return lines;
52 }

References lines.

Member Data Documentation

◆ expression

final Expression com.runehive.content.dialogue.PlayerDialogue.expression
private

The expression of this player.

Definition at line 11 of file PlayerDialogue.java.

Referenced by getExpression(), and PlayerDialogue().

◆ lines

final String [] com.runehive.content.dialogue.PlayerDialogue.lines
private

The text for this dialogue.

Definition at line 14 of file PlayerDialogue.java.

Referenced by getLines(), PlayerDialogue(), and PlayerDialogue().


The documentation for this class was generated from the following file: