Commit 9b2f4475 authored by Tt's avatar Tt

修改内容

parent 36bc1536
{"width":256,"imagePath":"L2BG2-下雪动效_tex.png","height":128,"name":"L2BG2-下雪动效","SubTexture":[{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17","x":124},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝","x":83},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_7","x":1},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_2","x":165},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_6","x":83},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_3","x":1},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_9","x":42},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_8","x":206},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_4","x":124},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17 拷贝 5_0","x":165},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_5","x":42}]} {"width":256,"imagePath":"L2BG2-下雪动效_tex.png","height":128,"name":"L2BG2-下雪动效","SubTexture":[{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17","x":83},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝","x":42},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_7","x":83},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_2","x":1},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_6","x":124},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_3","x":165},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_9","x":124},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_8","x":1},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_4","x":42},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17 拷贝 5_0","x":165},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_5","x":206}]}
\ No newline at end of file \ No newline at end of file
...@@ -47,7 +47,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -47,7 +47,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
Red: 0, Red: 0,
Blue: 0, Blue: 0,
letter: "", letter: "",
current: "Blue", current: "Red",
}; };
playerId; playerId;
isRoomOwner; isRoomOwner;
...@@ -1008,124 +1008,124 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1008,124 +1008,124 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log('startTest->' + this._status.letter); console.log('startTest->' + this._status.letter);
courseware && courseware.startTest(this._status.letter); //开始录音 courseware && courseware.startTest(this._status.letter); //开始录音
setTimeout(async () => { setTimeout(async () => {
let testData = { if (!courseware) {
"dtLastResponse": "2021-09-17 13:36:26:109", let testData = {
"refText": "I haven't found anything out about him yet.", "dtLastResponse": "2021-09-17 13:36:26:109",
"recordId": "6144295213f0a2200000ed93", "refText": "I haven't found anything out about him yet.",
"eof": 1, "recordId": "6144295213f0a2200000ed93",
"result": { "eof": 1,
"pronunciation": 25, "result": {
"resource_version": "3.1.0", "pronunciation": 25,
"fluency": 60, "resource_version": "3.1.0",
"rhythm": 90, "fluency": 60,
"kernel_version": "5.2.4", "rhythm": 90,
"overall": 25,//75 "kernel_version": "5.2.4",
"integrity": 100, "overall": 25,//75
"duration": "6.779", "integrity": 100,
"rear_tone": "fall", "duration": "6.779",
"speed": 96, "rear_tone": "fall",
"words": [ "speed": 96,
{ "words": [
"phonemes": [ {
{ "phonemes": [
"phoneme": "w", {
"pronunciation": 55, "phoneme": "w",
"span": { "pronunciation": 55,
"end": 95, "span": {
"start": 88 "end": 95,
"start": 88
}
},
{
"phoneme": "ɛ",
"pronunciation": 100,
"span": {
"end": 107,
"start": 95
}
},
{
"phoneme": "r",
"pronunciation": 99,
"span": {
"end": 123,
"start": 107
}
} }
}, ],
{ "phonics": [
"phoneme": "ɛ", {
"pronunciation": 100, "overall": 85,
"span": { "phoneme": [
"end": 107, "w",
"start": 95 "ɛ",
"r"
],
"spell": "Where"
} }
],
"scores": {
"overall": 80,
"pronunciation": 92
},
"span": {
"end": 123,
"start": 88
}, },
{ "word": "Where"
"phoneme": "r", }, {
"pronunciation": 99, "phonemes": [
"span": { {
"end": 123, "phoneme": "w",
"start": 107 "pronunciation": 55,
"span": {
"end": 95,
"start": 88
}
},
{
"phoneme": "ɛ",
"pronunciation": 100,
"span": {
"end": 107,
"start": 95
}
},
{
"phoneme": "r",
"pronunciation": 99,
"span": {
"end": 123,
"start": 107
}
} }
} ],
], "phonics": [
"phonics": [ {
{ "overall": 85,
"overall": 85, "phoneme": [
"phoneme": [ "w",
"w", "ɛ",
"ɛ", "r"
"r" ],
], "spell": "Where"
"spell": "Where"
}
],
"scores": {
"overall": 80,
"pronunciation": 92
},
"span": {
"end": 123,
"start": 88
},
"word": "Where"
}, {
"phonemes": [
{
"phoneme": "w",
"pronunciation": 55,
"span": {
"end": 95,
"start": 88
} }
],
"scores": {
"overall": 10,
"pronunciation": 92
}, },
{ "span": {
"phoneme": "ɛ", "end": 123,
"pronunciation": 100, "start": 88
"span": {
"end": 107,
"start": 95
}
}, },
{ "word": "Where"
"phoneme": "r", }
"pronunciation": 99, ]
"span": { },
"end": 123, "tokenId": "6144295408558b08dd000001",
"start": 107 "applicationId": "154838659000009e"
} }
}
],
"phonics": [
{
"overall": 85,
"phoneme": [
"w",
"ɛ",
"r"
],
"spell": "Where"
}
],
"scores": {
"overall": 10,
"pronunciation": 92
},
"span": {
"end": 123,
"start": 88
},
"word": "Where"
}
]
},
"tokenId": "6144295408558b08dd000001",
"applicationId": "154838659000009e"
}
if (!courseware) {
if (this.recrodEnd(testData)) { if (this.recrodEnd(testData)) {
await this.showVoiceGood(); await this.showVoiceGood();
return resolve(true) return resolve(true)
...@@ -1193,8 +1193,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1193,8 +1193,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
// return true; // return true;
let score = data.result.overall; let score = data.result.overall;
let isSuccess = this.checkWords(data); let isSuccess = this.checkWords(data);
this.log("score->" + score);
this.log("isSuccess->" + isSuccess);
if (score >= 70 && isSuccess) { if (score >= 70 && isSuccess) {
//提示成功
return true; return true;
} else { } else {
return false; return false;
......
...@@ -8,7 +8,7 @@ export class AI { ...@@ -8,7 +8,7 @@ export class AI {
Red: 0, Red: 0,
Blue: 0, Blue: 0,
letter: "", letter: "",
current: "Blue", current: "Red",
}; };
constructor(networkHelper: NetworkHelper, playerData: any) { constructor(networkHelper: NetworkHelper, playerData: any) {
......
...@@ -58,7 +58,7 @@ export class GameServer { ...@@ -58,7 +58,7 @@ export class GameServer {
name: this.nameList.splice(0, 1)[0], name: this.nameList.splice(0, 1)[0],
uuid: player.uuid, uuid: player.uuid,
color: color:
player.uuid == this.networkHelper.room.roomInfo.owner ? "Blue" : "Red", player.uuid == this.networkHelper.room.roomInfo.owner ? "Red" : "Blue",
isAI: player.isAI, isAI: player.isAI,
headUrl: this.headUrls.splice(0, 1)[0], headUrl: this.headUrls.splice(0, 1)[0],
}); });
...@@ -82,7 +82,7 @@ export class GameServer { ...@@ -82,7 +82,7 @@ export class GameServer {
Red: 0, Red: 0,
Blue: 0, Blue: 0,
letter: "", letter: "",
current: "Blue", current: "Red",
}; };
startGame() { startGame() {
this.networkHelper.sendFrame({ this.networkHelper.sendFrame({
...@@ -108,7 +108,7 @@ export class GameServer { ...@@ -108,7 +108,7 @@ export class GameServer {
const playerInfo = { const playerInfo = {
uuid: "ai_" + i, uuid: "ai_" + i,
isAI: true, isAI: true,
color: "Red", color: "Blue",
}; };
this._aiPlayerList.push(new AI(this.networkHelper, playerInfo)); this._aiPlayerList.push(new AI(this.networkHelper, playerInfo));
this.addPlayer(playerInfo); this.addPlayer(playerInfo);
......
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