added custom debug mode

This commit is contained in:
gocivici 2023-09-26 19:15:58 +03:00
parent 0493aa0c98
commit 6e1e5fa96e
2 changed files with 8 additions and 4 deletions

View File

@ -16,6 +16,7 @@ let row = 0;
let readyNow = false
let animationFrame = 0;
let pageVisible = true;
let debugMode = true;
let timeoutHandle;
// let atPosition = true;
@ -134,7 +135,7 @@ function animate(){
const allfPlayer = fPlayers[id]
allfPlayer.draw()
allfPlayer.debug()
if(debugMode) allfPlayer.debug()
allfPlayer.update()
}
@ -183,6 +184,9 @@ document.querySelector('#textInput').addEventListener('submit',(event)=>{
console.log('namechange')
fPlayers[socket.id].username = inputValue.replace("/name ","")
socket.emit('username',fPlayers[socket.id].username)
}else if(inputValue==='/debug'){
if(debugMode) {debugMode=false;}else{debugMode=true;}
}else{
fPlayers[socket.id].message=document.querySelector('#input').value

View File

@ -2,7 +2,7 @@
:root {
--header-image: url('./bgHOME4.png');
--body-bg-image: url('./abstract2.jpg');
--body-bg-image: url('./background2.png');
/* colors */
/* --content: #c3aae5; */
@ -67,9 +67,9 @@ and then link it! Many fonts have separate files for each style
margin: 0;
/* background-color: #08031A; */
/* you can delete the line below if you'd prefer to not use an image */
/* background-repeat: no-repeat;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover; */
background-size: cover;
color: #e9e4de;
background-image: var(--body-bg-image);
}