Commit 38ab8f31 authored by yu's avatar yu

录音音频

parent ff2da478

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
{
"ver": "1.0.1",
"uuid": "330b9e55-75ff-48b0-ade9-cfe1ccdc1511",
"subMetas": {}
}
\ No newline at end of file
{"width":256,"imagePath":"mao_ske_tex.png","height":512,"name":"mao_ske","SubTexture":[{"width":169,"y":175,"height":33,"name":"猫01/影子","x":64},{"width":88,"y":299,"height":55,"name":"猫01/尾巴","x":1},{"width":52,"y":210,"height":59,"name":"猫01/右腿","x":126},{"width":32,"y":249,"height":58,"name":"猫01/左腿","x":181},{"width":35,"y":335,"height":61,"name":"猫01/右手","x":178},{"width":62,"y":210,"height":37,"name":"猫01/左手","x":180},{"width":84,"y":1,"height":85,"name":"猫01伸/左手伸直","x":151},{"width":84,"y":88,"height":85,"name":"猫01伸/右手伸直","x":151},{"width":61,"y":207,"height":90,"name":"猫01/身体","x":1},{"width":60,"y":210,"height":78,"name":"猫01/领带","x":64},{"width":45,"y":369,"height":38,"name":"猫01/右耳","x":46},{"width":43,"y":356,"height":43,"name":"猫01/左耳","x":1},{"width":148,"y":1,"height":93,"name":"猫01/组_1","x":1},{"width":30,"y":249,"height":30,"name":"猫01/右眼","x":215},{"width":17,"y":285,"height":3,"name":"猫01/右眉毛","x":161},{"width":30,"y":401,"height":30,"name":"猫01/左眼","x":1},{"width":16,"y":290,"height":6,"name":"猫01/左眉毛","x":64},{"width":85,"y":335,"height":32,"name":"猫01/眼镜","x":91},{"width":88,"y":290,"height":43,"name":"猫01/胡子","x":91},{"width":14,"y":271,"height":12,"name":"猫01/鼻子","x":161},{"width":33,"y":271,"height":15,"name":"猫01/嘴","x":126},{"width":79,"y":96,"height":51,"name":"猫01/帽子","x":64},{"width":61,"y":96,"height":109,"name":"猫拿话筒(1)/左小手","x":1}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "81a4086b-ff2d-474e-80b6-6747c82f56c0",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dde7d004-a0d6-438b-8362-62553c4f9ecb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 512,
"platformSettings": {},
"subMetas": {
"mao_ske_tex": {
"ver": "1.0.4",
"uuid": "af5c7a84-aae6-493c-932b-10039b4695bc",
"rawTextureUuid": "dde7d004-a0d6-438b-8362-62553c4f9ecb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -5,
"offsetY": 40,
"trimX": 1,
"trimY": 1,
"width": 244,
"height": 430,
"rawWidth": 256,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -7869,8 +7869,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 362.6105263157899,
"height": 483.5647539622176
"width": 185.69,
"height": 241.78
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -7888,8 +7888,8 @@
0,
0,
1,
1,
1,
1.8,
1.8,
1
]
},
......@@ -7923,9 +7923,9 @@
"_animationName": "normal",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"playTimes": 0,
"premultipliedAlpha": false,
"_armatureKey": "198daec1-53df-44ff-a782-29f31476494d#f9132ab7-3aad-41ac-9ce1-568bc3e72c21",
"_armatureKey": "330b9e55-75ff-48b0-ade9-cfe1ccdc1511#81a4086b-ff2d-474e-80b6-6747c82f56c0",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
......@@ -7933,10 +7933,10 @@
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "198daec1-53df-44ff-a782-29f31476494d"
"__uuid__": "330b9e55-75ff-48b0-ade9-cfe1ccdc1511"
},
"_N$dragonAtlasAsset": {
"__uuid__": "f9132ab7-3aad-41ac-9ce1-568bc3e72c21"
"__uuid__": "81a4086b-ff2d-474e-80b6-6747c82f56c0"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 3,
......
......@@ -53,6 +53,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
isRoomOwner;
server: GameServer;
networkHelper: NetworkHelper;
recordWaitCount;
async initData() {
this.networkHelper = new NetworkHelper();
this.initNetworkListener();
......@@ -79,6 +80,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.server.startMatch();
}
await this.initHeadImgAndName();
this.recordWaitCount = 0;
}
async initHeadImgAndName() {
......@@ -1055,6 +1057,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
let progressBar = progress.getComponent(cc.ProgressBar)
progressBar.progress = 1;
let url = this.recordWaitCount == 0 ? this.data.recordWait : "";
this.playAudioByUrl(url, () => {
let cat = cc.find("cat", catBase);
asyncPlayDragonBoneAnimation(cat, "record", 0);
cc.tween(progressBar).delay(1).to(3, { progress: 0 }).call(() => {
}).start();
......@@ -1179,6 +1185,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
"tokenId": "6144295408558b08dd000001",
"applicationId": "154838659000009e"
}
this.recordWaitCount++;
if (this.recrodEnd(testData)) {
this.playLocalAudio("正确");
await this.showVoiceGood();
......@@ -1191,6 +1198,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
// await pg.time.delay(5);
courseware && courseware.stopTest(async (data) => {
this.recordWaitCount++;
data = JSON.parse(data);
if (this.recrodEnd(data)) {
this.playLocalAudio("正确");
......@@ -1203,6 +1211,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}); //结束录音
}, 4000);
})
});
}
showVoiceGood() {
......
......@@ -9,4 +9,5 @@ export const defaultData = {
"",
waitingTurn:
"",
recordWait: "http://staging-teach.cdn.ireadabc.com/31952573236dd316a8ee1672d1614a1c.mp3"
};
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
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