|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgraphics.GraphicsFacade
public class GraphicsFacade
Class interfacing to the Core package. Contains the high level methods of the Graphics package.
Field Summary | |
---|---|
private AudioSample |
attentionSound
|
private GameMode |
currentGameMode
|
private int |
currentModeActivated
|
private String |
lectureCode
|
private LectureGame |
lega
|
private ArrayList<String> |
loggedInUsers
|
(package private) ArrayList<FallingText> |
loginQueue
|
private QuestionGraphics |
questionGraphics
|
private Renderer |
renderer
|
private int |
screenState
|
Constructor Summary | |
---|---|
GraphicsFacade(boolean fullscreen,
Dimension dimension,
LectureGame lega)
Instantiates variables, mousehandler, keyboardhandler and the OpenGL graphics. |
Method Summary | |
---|---|
void |
currentModeActivated(int mode)
Updates the state of the current Mode. |
int |
getGameMode()
|
String |
getLectureCode()
|
ArrayList<String> |
getLoggedInUsers()
|
ArrayList<FallingText> |
getLoginQueue()
Returns the representation of names to be displayed in the welcome message. |
ClientNetworkThread |
getNetworkConnection()
|
QuestionGraphics |
getQuestionGraphics()
|
Renderer |
getRenderer()
|
int |
getScreenState()
|
void |
netSend(String string)
Sends the specified string to the Server. |
void |
newQuestion(String question,
ArrayList<String> alternatives,
int timelimit,
int correctAlternativeIndex,
int controlNumber)
Called whenever a new quesiton is received. |
void |
returnGameResults(Respondent[] respondents)
Routs the final high score list to the renderer for graphical processing. |
void |
returnResults(Respondent[] respondents)
Routs the result to the renderer instance for graphical processing. |
void |
returnRoundResults(Respondent[] respondents)
Routs the round result to the Server.renderer instance for graphical processing. |
void |
setLectureCode(String lectureCode)
|
void |
setLoggedInUsers(ArrayList<String> loggedInUsers)
|
void |
setLoginQueue(ArrayList<FallingText> loginQueue)
|
void |
setQuestionGraphics(QuestionGraphics questionGraphics)
|
void |
setScreenState(int screenState)
Called whenever the state of the program is changed in order for the Core package to know which state the program is in. |
void |
userLoggedIn(String userName)
Called whenever a user logs in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ArrayList<String> loggedInUsers
ArrayList<FallingText> loginQueue
private int screenState
private QuestionGraphics questionGraphics
private String lectureCode
private Renderer renderer
private int currentModeActivated
private LectureGame lega
private AudioSample attentionSound
private GameMode currentGameMode
Constructor Detail |
---|
public GraphicsFacade(boolean fullscreen, Dimension dimension, LectureGame lega)
fullscreen
- Fullscreen or windowed version.dimension
- Preferred resolution of the window/fullscreen.lega
- The LectureGame object.Method Detail |
---|
public void userLoggedIn(String userName)
userName
- public void newQuestion(String question, ArrayList<String> alternatives, int timelimit, int correctAlternativeIndex, int controlNumber)
question
- The actual question stringalternatives
- An array of alternatives as Stringstimelimit
- how many seconds the students will have to answer the questioncorrectAlternativeIndex
- The index of the correct alternativecontrolNumber
- an optional number for game specific processing. Might be the time of reception of the answers
for future implemntation, or the summarized score.public int getGameMode()
public QuestionGraphics getQuestionGraphics()
public void setQuestionGraphics(QuestionGraphics questionGraphics)
public int getScreenState()
public void setScreenState(int screenState)
screenState
- public ArrayList<FallingText> getLoginQueue()
public void setLoginQueue(ArrayList<FallingText> loginQueue)
public String getLectureCode()
public void setLectureCode(String lectureCode)
public ArrayList<String> getLoggedInUsers()
public void setLoggedInUsers(ArrayList<String> loggedInUsers)
public Renderer getRenderer()
public void returnResults(Respondent[] respondents)
respondents
- public void currentModeActivated(int mode)
mode
- public ClientNetworkThread getNetworkConnection()
public void netSend(String string)
string
- public void returnRoundResults(Respondent[] respondents)
respondents
- public void returnGameResults(Respondent[] respondents)
respondents
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |