diff --git a/css/style.css b/css/style.css index 79c14ce..513bec9 100644 --- a/css/style.css +++ b/css/style.css @@ -443,7 +443,7 @@ body{ top: -55px; right: -10px; } -.stickcome{ +.stick.stickcome{ animation: stickcome 2s 1 alternate; } /*大荧光棒*/ diff --git a/js/handle.js b/js/handle.js index 6f66bdc..697858e 100644 --- a/js/handle.js +++ b/js/handle.js @@ -27,6 +27,7 @@ let firTimes = 0; function getEvent(name) { let map = { '烟花':'fireworks', + '一起击剑':'stickcome', '起飞':'stickgo', '切歌' : 'change_song', '跳' : 'dancing-down', @@ -46,6 +47,7 @@ function getEvent(name) { function getLeaderEvent(name) { let map = { '烟花':'fireworks', + '一起击剑':'stickcome', '起飞':'stickgo', '切歌' : 'change_song', '一起跳' : 'dancing-down', @@ -159,7 +161,7 @@ function receiveMessage(event) if (highList.length > 0) { leaderInfo = highList[0] } - + // leaderInfo = '内有猛犬小心' // uid是否存在 不存在则存入uidObj let isNew = 0 @@ -268,7 +270,7 @@ function receiveMessage(event) },5000) } } - + //领舞起飞 if(leader.text==="起飞"){ if(firTimes==0){ firTimes++; @@ -281,6 +283,17 @@ function receiveMessage(event) },6000) } } + //一起击剑 + if(leader.text==="一起击剑"){ + if(firTimes==0){ + firTimes++; + $('.stick').addClass('stickcome'); + setTimeout(()=>{ + $('.stick').removeClass('stickcome'); + firTimes = 0; + },6000) + } + } // 领舞喊一起喊 if (leader.text.length >= 4) {