Commit f8b65a0e authored by 李维's avatar 李维

添加语音评测

parent 84eed4d9
{
"ver": "1.1.2",
"uuid": "0fd9456b-0a0b-4d6b-979c-592de3bb77e3",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "16155611-0510-4b2f-814f-4654d9469888",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "87e8bdef-072f-4642-b630-352bb34d47b4",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "94154e57-766f-40d4-bbbf-df71380cb89e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "a3ba0517-85ed-4261-9a08-b870f17250d2",
"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": "b74a4e8d-1abb-479a-a9bb-e524f10ddb01",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1da24c72-94e6-4d59-b05f-492adbf27b8d",
"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": "9452abf7-9dc2-4f81-9594-b290dccd56d7",
"rawTextureUuid": "1da24c72-94e6-4d59-b05f-492adbf27b8d",
"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
{
"ver": "1.1.2",
"uuid": "9cdcfa08-4442-4292-ae80-4ebe9ed4a601",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "912d5406-255f-4335-b658-9e41fc2c3375",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 534,
"height": 208,
"platformSettings": {},
"subMetas": {
"bg_good-job": {
"ver": "1.0.4",
"uuid": "84d90810-a77b-4174-a829-fef492783f2b",
"rawTextureUuid": "912d5406-255f-4335-b658-9e41fc2c3375",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 534,
"height": 208,
"rawWidth": 534,
"rawHeight": 208,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "17c6389b-7ba3-4d2c-8ee1-3c97cc7bcd06",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 623,
"height": 617,
"platformSettings": {},
"subMetas": {
"bg_light": {
"ver": "1.0.4",
"uuid": "56e8246b-d2b5-47c1-9208-10e0d2c0a7e1",
"rawTextureUuid": "17c6389b-7ba3-4d2c-8ee1-3c97cc7bcd06",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 4,
"trimY": 0,
"width": 615,
"height": 616,
"rawWidth": 623,
"rawHeight": 617,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "120bfc32-84fa-4b73-a6a0-cac5e47040a9",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 534,
"height": 208,
"platformSettings": {},
"subMetas": {
"bg_nice-try": {
"ver": "1.0.4",
"uuid": "bb731e4d-60a5-46d1-90ec-4ee2d0e0c4a1",
"rawTextureUuid": "120bfc32-84fa-4b73-a6a0-cac5e47040a9",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 534,
"height": 208,
"rawWidth": 534,
"rawHeight": 208,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1cf0fc6e-7ffe-4bdf-9d7f-05a2b6a6ae5d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 813,
"height": 51,
"platformSettings": {},
"subMetas": {
"progress_0": {
"ver": "1.0.4",
"uuid": "17ed4315-d528-4122-906f-f00a7ca8d34e",
"rawTextureUuid": "1cf0fc6e-7ffe-4bdf-9d7f-05a2b6a6ae5d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 813,
"height": 51,
"rawWidth": 813,
"rawHeight": 51,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7e3b2439-a64b-44ff-a54f-03e6f8d9a48b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 813,
"height": 51,
"platformSettings": {},
"subMetas": {
"progress_1": {
"ver": "1.0.4",
"uuid": "46d886d7-beab-4688-9fc1-9eb40f53607e",
"rawTextureUuid": "7e3b2439-a64b-44ff-a54f-03e6f8d9a48b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 5,
"trimX": 12,
"trimY": 5,
"width": 789,
"height": 31,
"rawWidth": 813,
"rawHeight": 51,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "508ab014-6601-4a1d-8c93-fb0b4d1ebd1b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 960,
"platformSettings": {},
"subMetas": {
"view_voice": {
"ver": "1.0.4",
"uuid": "79da5d41-1eaf-481a-8304-bd31d7533236",
"rawTextureUuid": "508ab014-6601-4a1d-8c93-fb0b4d1ebd1b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 960,
"rawWidth": 1280,
"rawHeight": 960,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "ccc1866e-0e87-47d5-be7e-4cc8eaf4e34c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 440,
"height": 440,
"platformSettings": {},
"subMetas": {
"voice_bg": {
"ver": "1.0.4",
"uuid": "1a4b4545-3e67-4496-af75-f996b12aac6a",
"rawTextureUuid": "ccc1866e-0e87-47d5-be7e-4cc8eaf4e34c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 440,
"height": 440,
"rawWidth": 440,
"rawHeight": 440,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -151,6 +151,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -151,6 +151,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 初始化界面 // 初始化界面
this.initLoadingLayer(); this.initLoadingLayer();
this.initOfflineLayer(); this.initOfflineLayer();
this.initPronunciationTestLayer();
this.initTurntable(); this.initTurntable();
this.initGemstone(); this.initGemstone();
this.initScore(); this.initScore();
...@@ -204,6 +205,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -204,6 +205,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.offlineLayer = offlineLayerNode.getComponent("PlayerOffLineLayer"); this.offlineLayer = offlineLayerNode.getComponent("PlayerOffLineLayer");
} }
// 语音评测组件
pronunciationTestLayer;
initPronunciationTestLayer() {
const loadingLayerBase = cc.find("Canvas/PronunciationTestLayer");
this.pronunciationTestLayer = loadingLayerBase.getComponent("PronunciationTestLayer");
}
redPlayerNode = null; redPlayerNode = null;
bluePlayerNode = null; bluePlayerNode = null;
redPlayerHomeNode = null; redPlayerHomeNode = null;
...@@ -549,11 +557,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -549,11 +557,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
itemData.index = index; itemData.index = index;
itemData.word = gem.name.split("_")[0]; itemData.word = gem.name.split("_")[0];
itemData.score = Number(gem.name.split("_")[1]); itemData.score = Number(gem.name.split("_")[1]);
itemData.word = gem.name.split("_")[0];
itemData.parentNode = gem; itemData.parentNode = gem;
itemData.beforeNode = cc.find("before", gem); itemData.beforeNode = cc.find("before", gem);
itemData.afterNode = cc.find("after", gem); itemData.afterNode = cc.find("after", gem);
gem['__score'] = itemData.score; gem['__score'] = itemData.score;
gem['__letter'] = gem.name.split("_")[0];
if(itemData.score == 1) { if(itemData.score == 1) {
gem['__arrIndex1'] = 0; gem['__arrIndex1'] = 0;
...@@ -688,7 +696,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -688,7 +696,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
}, (param)=>{ }, (param)=>{
// 游戏流程3: 测评 - 对手不会出现测评界面 // 游戏流程3: 测评 - 对手不会出现测评界面
this.runFunctionMySide((isAi)=>{ this.runFunctionMySide((isAi)=>{
console.log("语音评测开始"); console.log("语音评测开始", isAi);
if(isAi) {
setTimeout(() => { setTimeout(() => {
console.log("语音评测结束") console.log("语音评测结束")
if(Math.random() > 1) { if(Math.random() > 1) {
...@@ -701,6 +710,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -701,6 +710,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.runEvent(MSG_PLAYER_TO_HOME, {success: true, gemIndex: param.index}); this.runEvent(MSG_PLAYER_TO_HOME, {success: true, gemIndex: param.index});
} }
}, DEBUG?10:2000); }, DEBUG?10:2000);
} else {
this.pronunciationTestLayer.showVoice(this.gemstonesAll[param.index], this.gemstonesAll[param.index].__letter).then(res=>{
this.runEvent(MSG_PLAYER_TO_HOME, {success: res, gemIndex: param.index});
})
}
}) })
}) })
......
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