Commit ee01ab34 authored by 董政锦's avatar 董政锦

style: 跑道马阴影距离;加打印圈中马的上传数据;

parent e223f4d5
...@@ -105,16 +105,20 @@ function submitScore(save: boolean = false) { ...@@ -105,16 +105,20 @@ function submitScore(save: boolean = false) {
if (save) { if (save) {
//item_num 游戏项目(1到6) //item_num 游戏项目(1到6)
//wechat 原始token //wechat 原始token
sendGameMessage('submit_score_save', { const data = {
score: tick.value, score: tick.value,
wechat: wechat.token_origin, wechat: wechat.token_origin,
item_num: 1, item_num: 1,
nickname: wechat.nickname, nickname: wechat.nickname,
avatar: wechat.avatar, avatar: wechat.avatar,
rank: rank.value, rank: rank.value,
}) }
console.log('[WebSocket] send submit_score_save:', JSON.stringify(data, null, 2))
sendGameMessage('submit_score_save', data)
} else { } else {
sendGameMessage('submit_score', { score: tick.value }) const data = { score: tick.value }
console.log('[WebSocket] send submit_score:', JSON.stringify(data))
sendGameMessage('submit_score', data)
} }
} }
...@@ -193,6 +197,7 @@ function handleRoomBack() { ...@@ -193,6 +197,7 @@ function handleRoomBack() {
const hitHandler = (score: number) => { const hitHandler = (score: number) => {
tick.value += score tick.value += score
console.log('[WebSocket] 圈中马!得分:', score, '当前总分:', tick.value)
submitScore() submitScore()
playGame1Music() playGame1Music()
} }
......
...@@ -686,12 +686,12 @@ onBeforeUnmount(() => { ...@@ -686,12 +686,12 @@ onBeforeUnmount(() => {
/* ── 马匹脚底阴影 ── */ /* ── 马匹脚底阴影 ── */
.horse-shadow { .horse-shadow {
position: absolute; position: absolute;
bottom: 12px; bottom: -10px;
left: 50%; left: 50%;
width: 110px; width: 110px;
height: 18px; height: 18px;
transform: translateX(-50%); transform: translateX(-50%);
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.12) 40%, rgba(0, 0, 0, 0) 72%); background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.10) 40%, rgba(0, 0, 0, 0) 72%);
border-radius: 50%; border-radius: 50%;
pointer-events: none; pointer-events: none;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment