|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspeech.Sentence
public class Sentence
This class represents a single sentence
Constructor Summary | |
---|---|
Sentence(AbstractCharacterSprite character,
java.lang.String line,
int lineWidth,
java.awt.Color color,
int time)
Creates a new sentence with the specified parameters |
|
Sentence(AbstractCharacterSprite character,
java.lang.String line,
int lineWidth,
java.lang.String soundPath,
java.awt.Color color)
Creates a new sentence with the specified parameters |
Method Summary | |
---|---|
java.lang.String |
getAssignedSoundFile()
Returns the path+filename of the sound file that was assigned to this sentence |
AbstractCharacterSprite |
getRelatedCharacter()
Returns the character related to the sentence, i.e. the character that is speaking the sentence |
boolean |
isCurrentlySpoken()
Determines whether the sentence is currently spoken by a character |
void |
render(java.awt.Graphics2D g)
Render method of the sentence. |
void |
update(long elapsedTime)
Update method of the sentence |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Sentence(AbstractCharacterSprite character, java.lang.String line, int lineWidth, java.awt.Color color, int time)
character
- the character that says the sentenceline
- the line to be spokenlineWidth
- width of a line until line wrapcolor
- the color to display the sentence withtime
- the time the sentence shall be displayed (in miliseconds)public Sentence(AbstractCharacterSprite character, java.lang.String line, int lineWidth, java.lang.String soundPath, java.awt.Color color)
character
- the character that says the sentenceline
- the line to be spokenlineWidth
- width of a line until line wrapsoundPath
- path+filename to sound file corresponding to
this sentencecolor
- the color to display the sentence withMethod Detail |
---|
public AbstractCharacterSprite getRelatedCharacter()
public java.lang.String getAssignedSoundFile()
public void update(long elapsedTime)
elapsedTime
- time between two framespublic void render(java.awt.Graphics2D g)
g
- main render contextpublic boolean isCurrentlySpoken()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |