feat: 重构输入框为单输入框模式并添加震动反馈

- 将多输入框改为单个输入框,根据答案长度动态调整宽度
- 输入框 placeholder 显示答案字数提示
- 答案错误时触发微信小游戏震动反馈
- WxSDK 新增 vibrateShort/vibrateLong 方法
- 重构音效播放方法,提取公共 playSound 方法
This commit is contained in:
richarjiang
2026-03-14 19:04:48 +08:00
parent 71a38c1fe5
commit c9fbc5212a
5 changed files with 786 additions and 434 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "a34c93d2-cae0-42d4-a2eb-c3155052ad20",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "a34c93d2-cae0-42d4-a2eb-c3155052ad20@6c48a",
"displayName": "ContentBg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "a34c93d2-cae0-42d4-a2eb-c3155052ad20",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "a34c93d2-cae0-42d4-a2eb-c3155052ad20@f9941",
"displayName": "ContentBg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 304,
"height": 404,
"rawWidth": 304,
"rawHeight": 404,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-152,
-202,
0,
152,
-202,
0,
-152,
202,
0,
152,
202,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
404,
304,
404,
0,
0,
304,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-152,
-202,
0
],
"maxPos": [
152,
202,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "a34c93d2-cae0-42d4-a2eb-c3155052ad20@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "a34c93d2-cae0-42d4-a2eb-c3155052ad20@6c48a"
}
}