From 7367c9047f10c4af8829e21315c5f0385ca266c1 Mon Sep 17 00:00:00 2001 From: Fang_Zhijian Date: Wed, 29 May 2024 18:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=9E=E9=AA=8C=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=9A=E5=BC=BA=E5=BA=A6=E8=A1=B0=E5=87=8F=E3=80=81?= =?UTF-8?q?=E6=96=B0=E7=8E=A9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 可设置输出指定次数波形后强度衰减指定值 * 增加新的玩法(测试) --- src/App.vue | 87 +++++++++++++++++++++++++++++++++++++++++++-- src/socket/index.ts | 10 +++--- 2 files changed, 89 insertions(+), 8 deletions(-) diff --git a/src/App.vue b/src/App.vue index 084b7e3..a6a381d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,7 +4,7 @@ import {computed, ref, watch} from "vue" import axios from "axios" import { Notyf } from 'notyf' -import { createSocket, destroySocket } from "./socket/index" +import {createSocket, destroySocket, waveCounter} from "./socket/index" import { createCoyoteSocket, closeCoyoteSocket, @@ -109,6 +109,10 @@ const showSettings = ref(false) const showWarnWindow = ref(false) const warnWindowCountdown = ref(5); +// 测试玩法 +const showTestWindow = ref(false) +const maxHP = ref(1000) + // 连接状态 const gameState = ref(false) @@ -444,7 +448,56 @@ const guardLevelText = computed(() => {
- 【注意】请不要在直播过程中展示或使用郊狼主机及配件,直播务必遵守平台规则,否则可能导致账号被封禁!({{ warnWindowCountdown }}) + 【注意】请不要在直播过程中展示或使用郊狼主机及配件,直播务必遵守平台规则,否则可能导致账号被封禁!继续即自愿承担可能存在的风险。({{ warnWindowCountdown }}) +
+ + +
+
+ +
+
+

测试界面

+
+

绿色背景方便用色度键抠像,最大 HP 为

+

+
+
+
+
+ 武器A +
+
+
+ {{ channelAStrength + "/" + softAStrength }} +
+
+
+
+
+
+ 武器B +
+
+
+ {{ channelBStrength + "/" + softBStrength }} +
+
+
+
+
+
+
+
+ HP +
+
+
+ {{ (maxHP - channelAStrength*waveCounter) + "/" + maxHP }} +
+
+
+
@@ -615,6 +668,7 @@ const guardLevelText = computed(() => {

调试选项

+ @@ -656,4 +710,33 @@ const guardLevelText = computed(() => { .warn-window > * { margin: 10px; } + +.attribute-hp-board { + width: 600px; + height: 40px; + border: #fff 2px solid; + margin-left: 16px; +} +.attribute-hp-bg { + height: 40px; + background-color: #ff5151; + position: relative; + color: #fff; + line-height: 40px; + text-align: center; +} + +.attack-a-board { + width: 200px; + height: 20px; + border: #fff 2px solid; + margin-left: 16px; +} +.attack-a-bg { + height: 20px; + background-color: #fff; + position: relative; + color: #000; + text-align: center; +} diff --git a/src/socket/index.ts b/src/socket/index.ts index ade209f..8ef81b7 100644 --- a/src/socket/index.ts +++ b/src/socket/index.ts @@ -39,7 +39,7 @@ if (window.localStorage.getItem("test")) { console.log(testSettings.value) } -let waveCounter = testSettings.value.falloff[0] +let waveCounter = ref(0) /** * 转换大航海等级 @@ -107,11 +107,9 @@ function createSocket(authBody: string, wssLinks: string[]) { try { sendWaveData(5 * res.data.gift_num, 5 * res.data.gift_num, settings.value.waveData[res.data.gift_id], settings.value.waveData[res.data.gift_id]) notyf.success("收到礼物" + res.data.gift_name + "*"+res.data.gift_num) - waveCounter-- - console.log(waveCounter) - if (waveCounter == 0 && testSettings.value.falloff[0] > 0) { + waveCounter.value++ + if (waveCounter.value % testSettings.value.falloff[0] == 0 && testSettings.value.falloff[0] > 0) { notyf.success("触发强度衰减") - waveCounter = testSettings.value.falloff[0] addOrIncrease(1, 1, testSettings.value.falloff[1]) addOrIncrease(1, 2, testSettings.value.falloff[1]) } @@ -188,4 +186,4 @@ function getWsClient() { return ws } -export { createSocket, destroySocket, getWebSocketConfig, getWsClient } +export { createSocket, destroySocket, getWebSocketConfig, getWsClient, waveCounter }