Class DialogueState
java.lang.Object
com.csse3200.game.cutscene.runtime.states.DialogueState
State responsible for all rendering of the dialogue box
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar
Get the character at the current progressgetText()
int
void
Increment the text progress by 1 characterboolean
boolean
void
Set the speaker and text parametersvoid
setCanAdvance
(boolean canAdvance) void
setSpeaker
(String speaker) void
void
setTextProgress
(int textProgress) void
setVisible
(boolean visible)
-
Constructor Details
-
DialogueState
public DialogueState()
-
-
Method Details
-
set
Set the speaker and text parameters- Parameters:
speaker
- The text that will show up above the dialoguetext
- The text that will be "spoken"
-
incTextProgress
public void incTextProgress()Increment the text progress by 1 character -
getCurrentCharacter
public char getCurrentCharacter()Get the character at the current progress- Returns:
- The last visible character
-
isVisible
public boolean isVisible() -
getSpeaker
-
getText
-
getTextProgress
public int getTextProgress() -
isCanAdvance
public boolean isCanAdvance() -
setVisible
public void setVisible(boolean visible) -
setSpeaker
-
setText
-
setTextProgress
public void setTextProgress(int textProgress) -
setCanAdvance
public void setCanAdvance(boolean canAdvance)
-