yin5th 2021-12-02 13:50:30 +08:00
commit 60e47f93df
2 changed files with 16 additions and 3 deletions

View File

@ -443,7 +443,7 @@ body{
top: -55px; top: -55px;
right: -10px; right: -10px;
} }
.stickcome{ .stick.stickcome{
animation: stickcome 2s 1 alternate; animation: stickcome 2s 1 alternate;
} }
/*大荧光棒*/ /*大荧光棒*/

View File

@ -27,6 +27,7 @@ let firTimes = 0;
function getEvent(name) { function getEvent(name) {
let map = { let map = {
'烟花':'fireworks', '烟花':'fireworks',
'一起击剑':'stickcome',
'起飞':'stickgo', '起飞':'stickgo',
'切歌' : 'change_song', '切歌' : 'change_song',
'跳' : 'dancing-down', '跳' : 'dancing-down',
@ -46,6 +47,7 @@ function getEvent(name) {
function getLeaderEvent(name) { function getLeaderEvent(name) {
let map = { let map = {
'烟花':'fireworks', '烟花':'fireworks',
'一起击剑':'stickcome',
'起飞':'stickgo', '起飞':'stickgo',
'切歌' : 'change_song', '切歌' : 'change_song',
'一起跳' : 'dancing-down', '一起跳' : 'dancing-down',
@ -159,7 +161,7 @@ function receiveMessage(event)
if (highList.length > 0) { if (highList.length > 0) {
leaderInfo = highList[0] leaderInfo = highList[0]
} }
// leaderInfo = '内有猛犬小心'
// uid是否存在 不存在则存入uidObj // uid是否存在 不存在则存入uidObj
let isNew = 0 let isNew = 0
@ -268,7 +270,7 @@ function receiveMessage(event)
},5000) },5000)
} }
} }
//领舞起飞
if(leader.text==="起飞"){ if(leader.text==="起飞"){
if(firTimes==0){ if(firTimes==0){
firTimes++; firTimes++;
@ -281,6 +283,17 @@ function receiveMessage(event)
},6000) },6000)
} }
} }
//一起击剑
if(leader.text==="一起击剑"){
if(firTimes==0){
firTimes++;
$('.stick').addClass('stickcome');
setTimeout(()=>{
$('.stick').removeClass('stickcome');
firTimes = 0;
},6000)
}
}
// 领舞喊一起喊 // 领舞喊一起喊
if (leader.text.length >= 4) { if (leader.text.length >= 4) {