public void determineRoundInfo() { if (roundManager.isPlayerHost()) { //determine player, insert his name in question (Regex) and question for next turn. Player roundPlayer = getPlayer(); Librairy.Question roundQuestion = getQuestion(); roundQuestion.setValue(roundQuestion.onRegexPlayerNameInQuestion(roundPlayer.getName())); roundQuestion.setValue(roundQuestion.getValue().ToUpper()); //Synchronise answers with other clients. turnManager.setQuestionInfo(roundPlayer.getID(), roundPlayer.getName(), roundQuestion); uiManager.Instance.targetLabel.text = turnManager.getQuestionSelected().getValue(); lobbyManager.Instance.RpcSendRoundInfo(roundPlayer.getID(), roundPlayer.getName(), roundQuestion.getValue()); } }
public static void setQuestionInfo(string id, string name, Librairy.Question quest) { questionSelected = quest; playerNameTargeted = name; playerIDTargeted = id; }