Class TutorialTextController
java.lang.Object
com.mg105.interface_adapters.tutorial.TutorialTextController
A controller that converts phase number into displayed text
-
Constructor Summary
ConstructorDescriptionTutorialTextController
(boolean changeText) A constructor for the tutorial controller -
Method Summary
Modifier and TypeMethodDescriptionGet names of all phases of tutorialGets the current text that should be displayedboolean
Check if tutorial phases should advanceboolean
getActionPerformed
(String action) Returns if the action has been performedboolean
Check if player should be shown controls againGet an instance of the PlayerGetsTutorial use caseboolean
Get if the tutorial is complete, changes text if it isvoid
Go to the next tutorial phasevoid
Make text start changingvoid
setShowControls
(boolean show) Tell player the controls again
-
Constructor Details
-
TutorialTextController
public TutorialTextController(boolean changeText) A constructor for the tutorial controller- Parameters:
changeText
- whether to initially change the text.
-
-
Method Details
-
bottomText
Gets the current text that should be displayed- Returns:
- what the text displayed at the bottom of the screen should be
-
nextPhase
public void nextPhase()Go to the next tutorial phase -
setChangeText
public void setChangeText()Make text start changing -
changeText
public boolean changeText()Check if tutorial phases should advance- Returns:
- if text should start changing
-
getShowControls
public boolean getShowControls()Check if player should be shown controls again- Returns:
- whether player should be shown the control texts
-
setShowControls
public void setShowControls(boolean show) Tell player the controls again- Parameters:
show
- the text on the screen when true
-
getTutorial
Get an instance of the PlayerGetsTutorial use case- Returns:
- the tutorial instance
-
isComplete
public boolean isComplete()Get if the tutorial is complete, changes text if it is- Returns:
- if the tutorial is complete
-
getActionPerformed
Returns if the action has been performed- Parameters:
action
- that is checked- Returns:
- if the specified action has been performed
-
allPhases
Get names of all phases of tutorial- Returns:
- the list of all tutorial phases
-