Site
- add new request for start game in tournament - fix some bug with style
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/14 21:20:45 by edbernar #+# #+# */
|
||||
/* Updated: 2024/10/01 01:08:24 by edbernar ### ########.fr */
|
||||
/* Updated: 2024/10/02 13:43:43 by edbernar ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -41,14 +41,16 @@ class WaitingGamePage
|
||||
sentence.innerText = text + points;
|
||||
}, 500);
|
||||
timeout = setTimeout(() => {
|
||||
console.log("dsadsadas");
|
||||
if (opponentInfo && typeof(opponentInfo) != 'boolean')
|
||||
sendRequest("game", {action: 0, skinId: lastSelected ? lastSelected.id : 0, opponent: opponentInfo.id});
|
||||
else
|
||||
sendRequest("game", {action: 0, skinId: lastSelected ? lastSelected.id : 0, isRanked: opponentInfo ? true : false});
|
||||
timeout = null;
|
||||
}, 1500);
|
||||
returnButton.addEventListener('click', returnToLobby);
|
||||
}, (opponentInfo && typeof(opponentInfo) != 'boolean' && !opponentInfo.isTournament) ? 1500 : 500);
|
||||
if (!opponentInfo || typeof(opponentInfo) == 'boolean' || (typeof(opponentInfo) != 'boolean' && !opponentInfo.isTournament))
|
||||
returnButton.addEventListener('click', returnToLobby);
|
||||
else
|
||||
returnButton.remove();
|
||||
}
|
||||
|
||||
static dispose()
|
||||
|
Reference in New Issue
Block a user