diff --git a/js/handle.js b/js/handle.js index 8b7675c..f816038 100644 --- a/js/handle.js +++ b/js/handle.js @@ -121,11 +121,15 @@ function receiveMessage(event) let mathIndex = Math.floor(Math.random()*15) console.log(mathIndex, '随机因子') let randomEvent = eventTextList[mathIndex] ? eventTextList[mathIndex] : '' + // TODO 测试后 删除弹幕随机附加事件 let dm = {text: data.danmaku, uid: data.uid, uname: data.uname, event: getEvent(getFirstEventKeyword(data.danmaku+randomEvent)), is_new: random1, is_admin: 0, is_exit: random2, is_leader: isLeader} + + // TODO 测试后 删除领舞随机 + let leaderRandomEvent = getEvent(getFirstEventKeyword(data.danmaku+randomEvent)) let leader = { - uid: 0, uname: leaderInfo, text: '', event: '' + uid: 0, uname: leaderInfo, text: getEvent(getFirstEventKeyword(data.danmaku+randomEvent)), event: leaderRandomEvent } if (isLeader) { leader.uid = dm.uid @@ -136,7 +140,8 @@ function receiveMessage(event) console.log(dm, '弹幕') console.log(leader, '当前领舞') - console.log(leaderInfo, '本地缓存领舞') + console.log(leaderRandomEvent, '领舞随机事件') + let actionIndex = Math.floor(Math.random()*actionArr.length); let moveIndex = Math.floor(Math.random()*moveArr.length);