-new fix for rendering sprites
This commit is contained in:
parent
ec04498d66
commit
88eb75b248
@ -210,24 +210,25 @@ document.querySelector('#textInput').addEventListener('submit',(event)=>{
|
|||||||
|
|
||||||
}else if(inputValue.includes("/dino ")){
|
}else if(inputValue.includes("/dino ")){
|
||||||
console.log(inputValue.slice(6,7));
|
console.log(inputValue.slice(6,7));
|
||||||
|
var newSkin = "";
|
||||||
switch(inputValue.slice(6,7)) {
|
switch(inputValue.slice(6,7)) {
|
||||||
case '1':
|
case '1':
|
||||||
fPlayers[socket.id].skin = "Green";
|
newSkin = "Green";
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
fPlayers[socket.id].skin = "Red";
|
newSkin = "Red";
|
||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
fPlayers[socket.id].skin = "Orange";
|
newSkin = "Orange";
|
||||||
break;
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
fPlayers[socket.id].skin = "Blue";
|
newSkin = "Blue";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fPlayers[socket.id].skin = "Green";
|
newSkin = "Green";
|
||||||
}
|
}
|
||||||
socket.emit('skin',fPlayers[socket.id].skin);
|
socket.emit('skin',newSkin);
|
||||||
spriteFunctionUpdate(fPlayers[socket.id],fPlayers[socket.id].skin);
|
|
||||||
}else{
|
}else{
|
||||||
fPlayers[socket.id].message=document.querySelector('#input').value
|
fPlayers[socket.id].message=document.querySelector('#input').value
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user