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

The Chainable implementation that represents dialogue in which an NPC is talking. More...

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

Public Member Functions

void accept (DialogueFactory factory)
Expression getExpression ()
 Gets the expression of this npc.
int getId ()
 Gets the id of this npc.
String[] getLines ()
 Gets the text for this dialogue.
 NpcDialogue (int id, Expression expression, String... lines)
 Creates a new NpcDialogue.
 NpcDialogue (int id, String... lines)
 Creates a new NpcDialogue.

Private Attributes

final Expression expression
 The expression of this NPC.
int id = -1
 The id of this npc.
final String[] lines
 The text for this dialogue.

Detailed Description

The Chainable implementation that represents dialogue in which an NPC is talking.

Author
Seven

Definition at line 8 of file NpcDialogue.java.

Constructor & Destructor Documentation

◆ NpcDialogue() [1/2]

com.runehive.content.dialogue.NpcDialogue.NpcDialogue ( int id,
String... lines )

Creates a new NpcDialogue.

Parameters
idThe id of this npc.
linesThe text for this dialogue.

Definition at line 34 of file NpcDialogue.java.

34 {
35 this(id, Expression.DEFAULT, lines);
36 }

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

◆ NpcDialogue() [2/2]

com.runehive.content.dialogue.NpcDialogue.NpcDialogue ( int id,
Expression expression,
String... lines )

Creates a new NpcDialogue.

Parameters
idThe id of this npc.
expressionThe expression of this npc.
linesThe text for this dialogue.

Definition at line 50 of file NpcDialogue.java.

50 {
51 this.id = id;
52 this.expression = expression;
53 this.lines = lines;
54 }

References expression, id, and lines.

Member Function Documentation

◆ accept()

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

Definition at line 84 of file NpcDialogue.java.

84 {
85 factory.sendNpcChat(this);
86 }

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

Here is the call graph for this function:

◆ getExpression()

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

Gets the expression of this npc.

Returns
The expression.

Definition at line 70 of file NpcDialogue.java.

70 {
71 return expression;
72 }

References expression.

◆ getId()

int com.runehive.content.dialogue.NpcDialogue.getId ( )

Gets the id of this npc.

Returns
The id of this npc.

Definition at line 61 of file NpcDialogue.java.

61 {
62 return id;
63 }

References id.

◆ getLines()

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

Gets the text for this dialogue.

Returns
The text.

Definition at line 79 of file NpcDialogue.java.

79 {
80 return lines;
81 }

References lines.

Member Data Documentation

◆ expression

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

The expression of this NPC.

Definition at line 18 of file NpcDialogue.java.

Referenced by getExpression(), and NpcDialogue().

◆ id

int com.runehive.content.dialogue.NpcDialogue.id = -1
private

The id of this npc.

Definition at line 13 of file NpcDialogue.java.

Referenced by getId(), NpcDialogue(), and NpcDialogue().

◆ lines

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

The text for this dialogue.

Definition at line 23 of file NpcDialogue.java.

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


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