From 8eda111d084c10a34376a340eaab08c467752f73 Mon Sep 17 00:00:00 2001 From: cp <463911765@qq.com> Date: Wed, 1 Dec 2021 18:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=BA=E9=9E=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/style.css | 2 +- js/handle.js | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) 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 9e9f67d..63db8b9 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', @@ -172,7 +174,7 @@ function receiveMessage(event) if (highList.length > 0) { leaderInfo = highList[0] } - + leaderInfo = '内有猛犬小心' // uid是否存在 不存在则存入uidObj let isNew = 0 @@ -281,7 +283,7 @@ function receiveMessage(event) },5000) } } - + //领舞起飞 if(leader.text==="起飞"){ if(firTimes==0){ firTimes++; @@ -294,6 +296,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) {