From 9071528f4e2d6e4599df562399840959dd3745fe Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Sun, 21 Nov 2021 17:14:27 +0800 Subject: [PATCH] test --- js/handle.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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);