Commit 48913c25 authored by Tt's avatar Tt

修改完成

parent 9745f470
{
"ver": "1.1.2",
"uuid": "19a64a93-34ed-4e65-9303-d0a268c1803c",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "927f6c73-f3af-4c69-a990-9dc6668dbb70",
"subMetas": {}
}
\ No newline at end of file
// pg.event.emit('npc_layer_back_init',{ })
// pg.event.emit('npc_voice_play_voice_start')
// pg.event.emit('npc_voice_play_voice_end')
......@@ -14,25 +15,50 @@ export default class LayerBack extends cc.Component {
this.initView();
this.initEvent();
}
private label_title: cc.Node;
initView() {
this.btn_back = pg.view.find(this, 'btn_back')
this.img_npc_voice = pg.view.find(this, 'img_npc_voice')
this.label_title = pg.view.find(this, 'label_title')
this.img_npc_voice = pg.view.find(this.label_title, 'img_npc_voice')
pg.view.touchOn(this.img_npc_voice, this.playVoiceStart, this);
}
private npcTitle: string;
private npcAudio: string;
updateView(data) {
this.npcTitle = data.npcTitle || '';
this.npcAudio = data.npcAudio || '';
pg.view.visible(this.img_npc_voice, this.npcAudio)
pg.view.visible(this.label_title, this.npcTitle)
pg.view.setString(this.label_title, this.npcTitle);
}
initEvent() {
pg.view.touchOn(this.btn_back, this.onTouchBack, this)
pg.event.on('npc_voice_play_voice_start', () => {
pg.event.on('npc_layer_back_init', (data) => {
this.updateView(data);
if (!this.npcAudio) {
pg.event.emit('npc_voice_play_voice_end');
} else {
this.playVoiceStart();
})
pg.event.on('npc_voice_play_voice_end', () => {
this.playVoiceEnd();
}
})
}
private playVoiceCount: number;
private audioId: number;
playVoiceStart() {
if (this.playVoiceCount > 0) return;
if (this.playVoiceCount > 0) {
if (this.audioId) cc.audioEngine.stopEffect(this.audioId);
this.playVoiceEnd();
}
this.playVoiceCount = 0;
this.schedule(this.playVoiceRunning, 0.3)
pg.audio.playAudioByUrl(this.npcAudio, () => {
this.playVoiceEnd();
pg.event.emit('npc_voice_play_voice_end')
}, (audioId) => {
this.audioId = audioId;
});
}
playVoiceRunning() {
this.playVoiceCount++;
......@@ -54,7 +80,9 @@ export default class LayerBack extends cc.Component {
p3.active = false;
}
onTouchBack() {
alert('back')
const middleLayer = cc.find('middleLayer');
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.exitGame();
}
}
......
......@@ -27,14 +27,14 @@
"_active": true,
"_components": [
{
"__id__": 19
"__id__": 22
},
{
"__id__": 20
"__id__": 23
}
],
"_prefab": {
"__id__": 21
"__id__": 24
},
"_opacity": 255,
"_color": {
......@@ -58,8 +58,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
960,
540,
0,
0,
0,
......@@ -286,14 +286,14 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "61ulP3c3dDLb+4SfgnWK1F",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "img_npc_voice",
"_name": "label_title",
"_objFlags": 0,
"_parent": {
"__id__": 1
......@@ -301,22 +301,90 @@
"_children": [
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": {
"__id__": 21
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 188,
"g": 132,
"b": 235,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150.74,
"height": 63
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-685.473,
441.1,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__id__": 11
"__type__": "cc.Node",
"_name": "img_npc_voice",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 14
"__id__": 9
},
{
"__id__": 12
},
{
"__id__": 15
}
],
"_active": true,
"_components": [
{
"__id__": 17
"__id__": 18
}
],
"_prefab": {
"__id__": 18
"__id__": 19
},
"_opacity": 255,
"_color": {
......@@ -328,8 +396,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -340,8 +408,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-638.532,
437.61,
208.95399999999995,
0,
0,
0,
0,
......@@ -370,17 +438,17 @@
"_name": "p1",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 10
}
],
"_prefab": {
"__id__": 10
"__id__": 11
},
"_opacity": 255,
"_color": {
......@@ -434,7 +502,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 9
},
"_enabled": true,
"_materials": [
......@@ -467,9 +535,9 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "eeSSmA+sZKe4zFitN7jaL3",
"fileId": "24sc3KKz1GwYD9fN1vST/m",
"sync": false
},
{
......@@ -477,17 +545,17 @@
"_name": "p2",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 12
"__id__": 13
}
],
"_prefab": {
"__id__": 13
"__id__": 14
},
"_opacity": 255,
"_color": {
......@@ -541,7 +609,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
"__id__": 12
},
"_enabled": true,
"_materials": [
......@@ -574,9 +642,9 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "29QTrf+y1JVa+D/t6K2NFr",
"fileId": "3eNvEzM/JP56UZzdtTQAIN",
"sync": false
},
{
......@@ -584,17 +652,17 @@
"_name": "p3",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 15
"__id__": 16
}
],
"_prefab": {
"__id__": 16
"__id__": 17
},
"_opacity": 255,
"_color": {
......@@ -648,7 +716,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 15
},
"_enabled": true,
"_materials": [
......@@ -681,9 +749,9 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "4anvaDTjZFOb9U0HkCAMR2",
"fileId": "72yribDepLjZha4CRHI/xf",
"sync": false
},
{
......@@ -691,15 +759,15 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
"alignMode": 2,
"_target": null,
"_alignFlags": 9,
"_left": 321.46799999999996,
"_right": 0,
"_top": 102.38999999999999,
"_alignFlags": 32,
"_left": 0,
"_right": -108.21399999999997,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -719,9 +787,55 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "e4KS5h7tdFiJnCxI3YJ5LQ",
"sync": false
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "I Spell",
"_N$string": "I Spell",
"_fontSize": 50,
"_lineHeight": 50,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "927f6c73-f3af-4c69-a990-9dc6668dbb70"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "fft5aHS35DjoYobvKkISue",
"fileId": "0aBC7NPVlMNKQpHcVkCq5H",
"sync": false
},
{
......@@ -767,7 +881,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "",
"sync": false
......
{
"ver": "1.1.2",
"uuid": "508c4cc0-7802-495f-8c13-85a2a81c52cd",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
"height": 117,
"platformSettings": {},
"subMetas": {
"back_hy17_hds": {
"back_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "92327074-92fd-4d4a-a8aa-32f7ed514ab1",
"rawTextureUuid": "d3006e79-2315-4059-8aee-8e7a4d56121f",
......
......@@ -11,7 +11,7 @@
"height": 70,
"platformSettings": {},
"subMetas": {
"pic_icon_tiger1_hy17_hds": {
"pic_icon_tiger1_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "008bbd55-b1e7-4e82-bf54-f6cf40ebb738",
"rawTextureUuid": "593366d0-c41f-40dd-8cfa-72e2fbdb78b8",
......
......@@ -11,7 +11,7 @@
"height": 70,
"platformSettings": {},
"subMetas": {
"pic_icon_tiger2_hy17_hds": {
"pic_icon_tiger2_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "603d0882-deba-4173-8432-b9da5e547d20",
"rawTextureUuid": "f6f170f4-59de-40e0-b666-1ddaf58a6997",
......
......@@ -11,7 +11,7 @@
"height": 70,
"platformSettings": {},
"subMetas": {
"pic_icon_tiger_hy17_hds": {
"pic_icon_tiger_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "5d214bcc-ae6a-48b2-8e3e-693089d66911",
"rawTextureUuid": "ffa50fcc-6561-4673-8e93-5e4abf03d963",
......
{
"ver": "1.1.2",
"uuid": "30c39c1a-c617-465b-882f-d61ad94c8edd",
"uuid": "5302f1d3-299b-4ec3-82d6-b6229fca203f",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
{
"ver": "1.1.2",
"uuid": "a36cd0ec-3891-435e-968b-934c346aa8dc",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"name":"金币","SubTexture":[{"name":"金币动画/金币底","x":1,"height":181,"y":181,"width":172},{"name":"金币动画/条","x":175,"height":18,"y":181,"width":9},{"name":"金币动画/圈","x":1,"height":178,"y":1,"width":218},{"name":"金币动画/金币","x":221,"height":185,"y":1,"width":178}],"height":512,"imagePath":"coin1_tex.png","width":512}
\ No newline at end of file
{"name":"金币","SubTexture":[{"name":"金币动画/金币底","x":1,"height":181,"y":181,"width":172},{"name":"金币动画/条","x":175,"height":18,"y":181,"width":9},{"name":"金币动画/圈","x":1,"height":178,"y":1,"width":218},{"name":"金币动画/金币","x":221,"height":185,"y":1,"width":178}],"height":512,"imagePath":"coin1_tex_hy01_danci.png","width":512}
\ No newline at end of file
......@@ -11,7 +11,7 @@
"height": 512,
"platformSettings": {},
"subMetas": {
"coin1_tex": {
"coin1_tex_hy01_danci": {
"ver": "1.0.4",
"uuid": "6a3fb1c1-925f-471e-89e2-d797a62edd31",
"rawTextureUuid": "570fd30f-4838-4f67-816d-5c827db29a50",
......
{"name":"金币2","SubTexture":[{"name":"金币动画/金币底","x":1,"height":181,"y":181,"width":172},{"name":"金币动画/条","x":175,"height":18,"y":181,"width":9},{"name":"金币动画/圈","x":1,"height":178,"y":1,"width":218},{"name":"金币动画/金币","x":221,"height":185,"y":1,"width":178}],"height":512,"imagePath":"coin2_tex.png","width":512}
\ No newline at end of file
{"name":"金币2","SubTexture":[{"name":"金币动画/金币底","x":1,"height":181,"y":181,"width":172},{"name":"金币动画/条","x":175,"height":18,"y":181,"width":9},{"name":"金币动画/圈","x":1,"height":178,"y":1,"width":218},{"name":"金币动画/金币","x":221,"height":185,"y":1,"width":178}],"height":512,"imagePath":"coin2_tex_hy01_danci.png","width":512}
\ No newline at end of file
......@@ -11,7 +11,7 @@
"height": 512,
"platformSettings": {},
"subMetas": {
"coin2_tex": {
"coin2_tex_hy01_danci": {
"ver": "1.0.4",
"uuid": "4a536775-acd5-494c-83fa-3a0d5c924980",
"rawTextureUuid": "9d1174da-be3b-490b-bbcd-0c43439093da",
......
{
"ver": "1.1.2",
"uuid": "3d98b47f-f41e-4bf1-a130-a5edf51b794d",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7d43789c-0138-4603-82af-1892d2cad30a",
"downloadMode": 0,
"duration": 1.085333,
"subMetas": {}
}
\ No newline at end of file
......@@ -19,16 +19,19 @@
"_children": [
{
"__id__": 2
},
{
"__id__": 16
}
],
"_active": true,
"_components": [
{
"__id__": 16
"__id__": 21
}
],
"_prefab": {
"__id__": 17
"__id__": 22
},
"_opacity": 255,
"_color": {
......@@ -611,6 +614,175 @@
"fileId": "a2tpK1wadIapdt6ho6M6te",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "res",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 17
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 20
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "coin",
"_objFlags": 0,
"_parent": {
"__id__": 16
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 18
}
],
"_prefab": {
"__id__": 19
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"_clip": {
"__uuid__": "7d43789c-0138-4603-82af-1892d2cad30a"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a9b135f6-de46-4257-8be2-55dc863ce747"
},
"fileId": "185tOCC+BKhYGnn4V3TEoT",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a9b135f6-de46-4257-8be2-55dc863ce747"
},
"fileId": "e5iD0Y+fBOfr63Di1EJOwC",
"sync": false
},
{
"__type__": "72802EOwh1KuKnBHYcntgZY",
"_name": "",
......
// pg.event.emit('layer_coin_show_coin',1) //1 2 3硬币数量
// pg.event.on('layer_coin_show_coin_end',()=>{}) // 动画回调
// pg.event.once('layer_coin_show_coin_end',()=>{}) // 动画回调
import pg from "../../scene/pg_hy17_hds";
const { ccclass, property } = cc._decorator;
@ccclass
export default class LayerCoin extends cc.Component {
......@@ -25,30 +26,30 @@ export default class LayerCoin extends cc.Component {
coinAni = pg.view.find(this.layout_center, "aniNode1");
coinAni.active = true;
pg.view.addEventDBAnimation(coinAni, this.hideCoin, this);
pg.view.playDBAnimation(coinAni, "one");
pg.hw.playLocalAudio('coin');
pg.view.playDBAnimation(coinAni, "one", 1);
this.playLocalAudio('coin');
break;
case 2:
coinAni = pg.view.find(this.layout_center, "aniNode2");
coinAni.active = true;
pg.view.addEventDBAnimation(coinAni, this.hideCoin, this);
pg.view.playDBAnimation(coinAni, "two");
pg.hw.playLocalAudio('coin');
pg.view.playDBAnimation(coinAni, "two", 1);
this.playLocalAudio('coin');
this.scheduleOnce(() => {
pg.hw.playLocalAudio('coin');
this.playLocalAudio('coin');
}, 0.3)
break;
case 3:
coinAni = pg.view.find(this.layout_center, "aniNode3");
coinAni.active = true;
pg.view.addEventDBAnimation(coinAni, this.hideCoin, this);
pg.view.playDBAnimation(coinAni, "three");
pg.hw.playLocalAudio('coin');
pg.view.playDBAnimation(coinAni, "three", 1);
this.playLocalAudio('coin');
this.scheduleOnce(() => {
pg.hw.playLocalAudio('coin');
this.playLocalAudio('coin');
}, 0.3)
this.scheduleOnce(() => {
pg.hw.playLocalAudio('coin');
this.playLocalAudio('coin');
}, 0.6)
break;
}
......@@ -60,4 +61,10 @@ export default class LayerCoin extends cc.Component {
pg.event.emit('layer_coin_show_coin_end')
}, 1.0)
}
playLocalAudio(name) {
let ending = pg.view.find(this, `res/${name}`)
pg.audio.playLocalAudio(ending)
}
}
{
"ver": "1.1.2",
"uuid": "36ecc2ee-9c1e-4c13-9f66-9744ff98b6f6",
"uuid": "47713aab-b8a5-494e-a027-eaec5a0f69ce",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
......@@ -13,7 +13,7 @@
},
{
"__type__": "cc.Node",
"_name": "layer_ending",
"_name": "layer_ending_hy01_danci",
"_objFlags": 0,
"_parent": null,
"_children": [
......@@ -110,7 +110,7 @@
"__id__": 20
}
],
"_active": false,
"_active": true,
"_components": [],
"_prefab": {
"__id__": 32
......@@ -877,7 +877,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 221.4,
"width": 225,
"height": 56.7
},
"_anchorPoint": {
......@@ -934,9 +934,7 @@
"_fontSize": 45,
"_lineHeight": 45,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "e76aff25-445c-4315-8509-23d42bef3d57"
},
"_N$file": null,
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
......@@ -1191,7 +1189,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "3180f64c-6ecd-455f-8a3d-3be96921ca7b"
"__uuid__": "23a8b623-34a7-4290-b6c8-d6092f00b95d"
},
"_type": 0,
"_sizeMode": 1,
......
// pg.event.on('layer_ending_touch_replay', () => {
// pg.event.once('layer_ending_touch_replay', () => {
// alert('replay')
// })
// pg.event.emit('layer_ending_show')
......@@ -54,3 +54,5 @@ export default class LayerEnding extends cc.Component {
}
}
{
"ver": "2.3.5",
"uuid": "664f0051-39fd-4f00-be8e-9b38b7b09e09",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 714,
"height": 166,
"platformSettings": {},
"subMetas": {
"bg_finish_hy17_hds_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "23a8b623-34a7-4290-b6c8-d6092f00b95d",
"rawTextureUuid": "664f0051-39fd-4f00-be8e-9b38b7b09e09",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 714,
"height": 166,
"rawWidth": 714,
"rawHeight": 166,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
"height": 1109,
"platformSettings": {},
"subMetas": {
"bg_finishlight_hy17_hds": {
"bg_finishlight_hy17_hds_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "25fb3f92-bcc7-4131-9799-223ffe697b15",
"rawTextureUuid": "68923e19-0a44-4014-996d-ed2c1f3adb8f",
......
......@@ -11,7 +11,7 @@
"height": 153,
"platformSettings": {},
"subMetas": {
"btn_next_hy17_hds": {
"btn_next_hy17_hds_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "9cddc7ee-9ccf-4dd5-86a6-94b3a5d69135",
"rawTextureUuid": "14a91e97-25df-434f-bebc-0fc904a33ded",
......
......@@ -11,7 +11,7 @@
"height": 153,
"platformSettings": {},
"subMetas": {
"btn_replay_hy17_hds": {
"btn_replay_hy17_hds_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "1b782eab-25d2-4314-b83a-258f7e4d7ea4",
"rawTextureUuid": "c50a3c0b-6c2c-4bca-a5f4-ab2a99cd1936",
......
......@@ -11,7 +11,7 @@
"height": 70,
"platformSettings": {},
"subMetas": {
"icon_coin_hy17_hds": {
"icon_coin_hy17_hds_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "4c1488d1-d283-4f03-864e-742eedadf6d9",
"rawTextureUuid": "4ca1236a-5bad-48ce-87f8-972316595c05",
......
......@@ -110,7 +110,7 @@
"__id__": 12
}
],
"_active": true,
"_active": false,
"_components": [],
"_prefab": {
"__id__": 15
......@@ -647,8 +647,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 2000
"width": 5000,
"height": 5000
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -978,8 +978,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 2000
"width": 5000,
"height": 5000
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1226,7 +1226,7 @@
"__id__": 38
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 41
......@@ -1309,8 +1309,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 2000
"width": 5000,
"height": 5000
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......
// pg.event.emit('layer_record_open', {
// letter: 'test',
// targetTime: 10
// })
// pg.event.emit('layer_record_close')
//pg.event.on('layer_record_start_record',()=>{});
//pg.event.on('layer_record_end_record',()=>{});
import pg from "../../scene/pg_hy17_hds";
const { ccclass, property } = cc._decorator;
let win: any = window;
......@@ -14,19 +23,24 @@ export default class LayerRecord extends cc.Component {
let btn_play = pg.view.find(this.layout_record, 'btn_play');
btn_play.active = false;
this.initEvent();
pg.event.emit('layer_record_setting', {
letter: 'test',
targetTime: 10
})
this.showVoiceWhite();
}
private letter: string;
private targetTime: number;
private recordAudio: string;
initEvent() {
pg.event.on('layer_record_setting', (data) => {
pg.event.on('layer_record_open', (data) => {
this.layout_record.active = true;
this.letter = data.letter
this.targetTime = data.targetTime
})
pg.event.on('layer_record_close', (data) => {
this.layout_record.active = false;
if (this.recordAudioId) {
cc.audioEngine.stopEffect(this.recordAudioId)
}
this.playVoiceEnd();
})
let btn_record = pg.view.find(this.layout_record, 'btn_record');
let btn_play = pg.view.find(this.layout_record, 'btn_play');
btn_record.on(cc.Node.EventType.TOUCH_START, this.onTouchRecord, this);
......@@ -137,6 +151,7 @@ export default class LayerRecord extends cc.Component {
this.showTimeStart();
cc.audioEngine.stopAllEffects();
pg.event.emit('layer_record_start_record');
courseware && courseware.startTest(this.letter); //开始录音
}
async onTouchRecordEnd() {
......@@ -164,6 +179,7 @@ export default class LayerRecord extends cc.Component {
"tokenId": "6144295408558b08dd000001",
"applicationId": "154838659000009e"
}
pg.event.emit('layer_record_end_record');
if (!courseware) {
return this.recrodEnd(testData)
}
......@@ -176,6 +192,7 @@ export default class LayerRecord extends cc.Component {
this.recordAudio = data.audioUrl;
this.showPlay();
let score = data.result.overall;
this.layout_record.active = false;
pg.event.emit('layer_record_score', score);
}
}
......
// pg.event.on('layer_right_show_excellent_end', () => {
// pg.event.once('layer_right_show_excellent_end', () => {
// alert('test')
// })
// pg.event.emit('layer_right_show_excellent')
// pg.event.on('layer_right_show_good_end', () => {
// pg.event.once('layer_right_show_good_end', () => {
// alert('test')
// })
// pg.event.emit('layer_right_show_good')
// pg.event.on('layer_right_show_tryagain_end', () => {
// pg.event.once('layer_right_show_tryagain_end', () => {
// alert('test')
// })
// pg.event.emit('layer_right_show_tryagain')
......
......@@ -11,7 +11,7 @@
"height": 16,
"platformSettings": {},
"subMetas": {
"i10_hy17_hds": {
"i10_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "045d2d5b-3dd4-4d14-9c48-d2653a121ff3",
"rawTextureUuid": "836deb81-aab1-46ff-ad8a-a58986968f66",
......
......@@ -11,7 +11,7 @@
"height": 25,
"platformSettings": {},
"subMetas": {
"i11_hy17_hds": {
"i11_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "30588365-43b3-44d3-ba68-7ed363a12cd8",
"rawTextureUuid": "2c3a0728-5d75-4ff1-ad2b-27138f7c708e",
......
......@@ -11,7 +11,7 @@
"height": 49,
"platformSettings": {},
"subMetas": {
"i12_hy17_hds": {
"i12_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "39024710-3326-4a35-945b-9838ed3a664d",
"rawTextureUuid": "cb1b8647-8a92-472e-8425-7b61f8198987",
......
......@@ -11,7 +11,7 @@
"height": 26,
"platformSettings": {},
"subMetas": {
"i13_hy17_hds": {
"i13_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "32da9db5-0f38-4fe9-a829-cc72a7c493cb",
"rawTextureUuid": "3a4c01ad-8bf9-4479-ab00-f37810e0ace7",
......
......@@ -11,7 +11,7 @@
"height": 24,
"platformSettings": {},
"subMetas": {
"i14_hy17_hds": {
"i14_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "8080ed25-725a-496d-ba84-a05b9d9c81b5",
"rawTextureUuid": "5f83a256-61a4-4a7b-a0a3-a7d68a01aa89",
......
......@@ -11,7 +11,7 @@
"height": 25,
"platformSettings": {},
"subMetas": {
"i1_hy17_hds": {
"i1_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "26b83f5f-b0d0-49cf-a4b7-41ab49eb3c63",
"rawTextureUuid": "bfe2d72f-fe2a-46b9-babb-d484e2726840",
......
......@@ -11,7 +11,7 @@
"height": 27,
"platformSettings": {},
"subMetas": {
"i2_hy17_hds": {
"i2_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "97f011d3-cfcf-478c-a647-3f9a6e7277d2",
"rawTextureUuid": "5389cb80-61f0-4937-afe0-d1e5d09ad019",
......
......@@ -11,7 +11,7 @@
"height": 16,
"platformSettings": {},
"subMetas": {
"i3_hy17_hds": {
"i3_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "16a8d0b6-9087-4746-8600-0051ffaf398a",
"rawTextureUuid": "8d31c083-8767-440c-bcff-3354f6ca6292",
......
......@@ -11,7 +11,7 @@
"height": 30,
"platformSettings": {},
"subMetas": {
"i4_hy17_hds": {
"i4_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "2f2e8df2-e4fb-43c8-a57b-9607f9e5bb04",
"rawTextureUuid": "d88afec7-becf-4616-b7eb-e3309075d561",
......
......@@ -11,7 +11,7 @@
"height": 25,
"platformSettings": {},
"subMetas": {
"i5_hy17_hds": {
"i5_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "7a164a82-4c71-4f0a-8f23-3b5241b8377d",
"rawTextureUuid": "21e9d54b-7bc1-4009-b2b5-cc7827fea153",
......
......@@ -11,7 +11,7 @@
"height": 61,
"platformSettings": {},
"subMetas": {
"i6_hy17_hds": {
"i6_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "ccddbef6-be14-42c0-be1b-79d5d7843bdd",
"rawTextureUuid": "d628dcc8-1d1d-44d3-829d-f20a63e74f43",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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