added listener to InterogationNextButton
This commit is contained in:
		
							parent
							
								
									71aedd3854
								
							
						
					
					
						commit
						03ce844c6a
					
				| @ -16,6 +16,15 @@ function hideEmotionAndCulpritChoices(){ | ||||
|     document.getElementsByClassName("emotion_and_culprit_choices")[0].classList.add("hidden"); | ||||
| } | ||||
| 
 | ||||
| function setListenerToInterrogationNextBtn(){ | ||||
|     document.getElementById("interrogation_next_btn").addEventListener("click", showInterogationView) | ||||
| } | ||||
| 
 | ||||
| function showInterogationView(){ | ||||
|     hideInterogation(); | ||||
|     showEmotionAndCulpritChoices(); | ||||
| } | ||||
| 
 | ||||
| function renderAnswerSelectionPanel() { | ||||
|     npcs_ids.forEach(element => { | ||||
|         console.log(element); | ||||
| @ -89,6 +98,7 @@ async function initGame(){ | ||||
|     //initSock();
 | ||||
|     renderAnswerSelectionPanel(); | ||||
|     renderInterogation(); | ||||
|     setListenerToInterrogationNextBtn(); | ||||
|     showInterogation(); | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -108,16 +108,6 @@ function areInputsValid(checkRoomCode) { | ||||
|     return true; | ||||
| } | ||||
| 
 | ||||
| function startSoloGame() { | ||||
|     if (!areInputsValid(false)) { | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     hideInvalidInputErrorMessage(); | ||||
| 
 | ||||
|     //TODO: code to start solo game
 | ||||
| } | ||||
| 
 | ||||
| function createMultiPlayerRoom() { | ||||
|     if (!areInputsValid(false)) { | ||||
|         return; | ||||
| @ -209,6 +199,13 @@ function changeTheme() { | ||||
| } | ||||
| 
 | ||||
| async function startSoloGame(){ | ||||
| 
 | ||||
|     if (!areInputsValid(false)) { | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     hideInvalidInputErrorMessage(); | ||||
| 
 | ||||
|     username = document.getElementById("game_username").value; | ||||
|     let data = {} | ||||
|     data["username"] = username; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user