Package rea.events
Class MessageUpdateEvent
java.lang.Object
rea.events.MessageUpdateEvent
- All Implemented Interfaces:
UpdateEvent
An event that delivers a message to a player.
The message can be delivered by a character or by the game itself.
In the later case, the speaker is
null
.- Author:
- José Paulo Leal
jpleal@fc.up.pt
-
Constructor Summary
ConstructorsConstructorDescriptionMessageUpdateEvent
(String message) Create a message update event with a message.MessageUpdateEvent
(Character speaker, String message) Create a message update event with a message and a speaker. -
Method Summary
Modifier and TypeMethodDescriptionThe message to deliverThe character that uttered the message.
-
Constructor Details
-
MessageUpdateEvent
Create a message update event with a message.- Parameters:
message
- to deliver
-
MessageUpdateEvent
Create a message update event with a message and a speaker.- Parameters:
speaker
- the character delivering the messagemessage
- to deliver
-
-
Method Details
-
getMessage
The message to deliver- Returns:
- the message
-
getSpeaker
The character that uttered the message. If the message was generated by the game itself, the speaker isnull
.- Returns:
- the speaker
-