增加出鞘

master
cp 2021-12-01 18:20:03 +08:00
parent ea7a0d2555
commit 8eda111d08
2 changed files with 16 additions and 3 deletions

View File

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

View File

@ -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) {