优化一起击剑、一起起飞、起飞、击剑

master
chen 2021-12-07 13:39:25 +08:00
parent ee77f3fe4b
commit 8855992e50
1 changed files with 33 additions and 33 deletions

View File

@ -179,8 +179,8 @@ function receiveMessage(event)
if (highList!=undefined && highList.length > 0) {
leaderInfo = highList[0]
}
leaderInfo = '内有猛犬小心'
// leaderInfo = '饺子吃肉肉'
// leaderInfo = '内有猛犬小心'
leaderInfo = '饺子吃肉肉'
// uid是否存在 不存在则存入uidObj
let isNew = 0
@ -293,29 +293,29 @@ function receiveMessage(event)
}
}
//领舞起飞
// if(leader.text==="起飞"){
// if(firTimes==0){
// firTimes++;
// $('.stick').removeClass('stick-swing');
// $('.stick').addClass('stick-go');
// setTimeout(()=>{
// $('.stick').removeClass('stick-go');
// $('.stick').addClass('stick-swing');
// firTimes = 0;
// },6000)
// }
// }
if(leader.text==="起飞"){
if(firTimes==0){
firTimes++;
$('.stick').removeClass('stick-swing');
$('.stick').addClass('stick-go');
setTimeout(()=>{
$('.stick').removeClass('stick-go');
$('.stick').addClass('stick-swing');
firTimes = 0;
},6000)
}
}
//一起击剑
// if(leader.text==="一起击剑"){
// if(firTimes==0){
// firTimes++;
// $('.stick').addClass('stickcome');
// setTimeout(()=>{
// $('.stick').removeClass('stickcome');
// firTimes = 0;
// },6000)
// }
// }
if(leader.text==="一起击剑"){
if(firTimes==0){
firTimes++;
$('.stick').addClass('stickcome');
setTimeout(()=>{
$('.stick').removeClass('stickcome');
firTimes = 0;
},6000)
}
}
// 领舞喊一起喊
if (leader.text.length >= 4) {
@ -333,15 +333,15 @@ function receiveMessage(event)
allDancing(leader.event);
}
// 领舞喊荧光棒事件
if(getLeaderFluoEvent(leader.text)!=''){
if(firTimes==0){//防多次说话
firTimes++;
console.log(getLeaderFluoEvent(leader.text));
setTimeout(()=>{
firTimes = 0;
},5000)
}
}
// if(getLeaderFluoEvent(leader.text)!=''){
// if(firTimes==0){//防多次说话
// firTimes++;
// console.log(getLeaderFluoEvent(leader.text));
// setTimeout(()=>{
// firTimes = 0;
// },5000)
// }
// }
}
// -------------------- 每条弹幕处理 end -----------------------
}