Commit ddede972 authored by Tt's avatar Tt

待提供无黑边图片

parent eb692f80
......@@ -87,28 +87,31 @@
"__id__": 72
},
{
"__id__": 75
"__id__": 74
},
{
"__id__": 109
"__id__": 77
},
{
"__id__": 111
},
{
"__id__": 113
},
{
"__id__": 115
}
],
"_active": true,
"_components": [
{
"__id__": 133
"__id__": 135
},
{
"__id__": 134
"__id__": 136
},
{
"__id__": 135
"__id__": 137
}
],
"_prefab": null,
......@@ -3449,19 +3452,113 @@
},
{
"__type__": "cc.Node",
"_name": "ani_npc",
"_name": "img_npc",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 73
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 124,
"height": 136
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
850.23,
443.913,
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": "60CBeDhRNGerR0ogorUCw1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "24bacd99-16bc-499a-9c70-be9ccfeea10e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a6OdIbqlxBNaftQguyOArn"
},
{
"__type__": "cc.Node",
"_name": "ani_npc",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 75
},
{
"__id__": 74
"__id__": 76
}
],
"_prefab": null,
......@@ -3517,7 +3614,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 74
},
"_enabled": true,
"_materials": [
......@@ -3557,7 +3654,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 74
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3629,19 +3726,19 @@
},
"_children": [
{
"__id__": 76
"__id__": 78
},
{
"__id__": 104
"__id__": 106
},
{
"__id__": 106
"__id__": 108
}
],
"_active": true,
"_components": [
{
"__id__": 108
"__id__": 110
}
],
"_prefab": null,
......@@ -3697,17 +3794,17 @@
"_name": "layout_cover",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 77
},
"_children": [
{
"__id__": 77
"__id__": 79
}
],
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 105
}
],
"_prefab": null,
......@@ -3763,23 +3860,23 @@
"_name": "btn_record",
"_objFlags": 0,
"_parent": {
"__id__": 76
"__id__": 78
},
"_children": [
{
"__id__": 78
"__id__": 80
},
{
"__id__": 91
"__id__": 93
},
{
"__id__": 95
"__id__": 97
}
],
"_active": true,
"_components": [
{
"__id__": 102
"__id__": 104
}
],
"_prefab": null,
......@@ -3835,17 +3932,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 77
"__id__": 79
},
"_children": [
{
"__id__": 79
"__id__": 81
}
],
"_active": true,
"_components": [
{
"__id__": 90
"__id__": 92
}
],
"_prefab": null,
......@@ -3901,23 +3998,23 @@
"_name": "layout_btns",
"_objFlags": 0,
"_parent": {
"__id__": 78
"__id__": 80
},
"_children": [
{
"__id__": 80
"__id__": 82
},
{
"__id__": 83
"__id__": 85
},
{
"__id__": 86
"__id__": 88
}
],
"_active": true,
"_components": [
{
"__id__": 89
"__id__": 91
}
],
"_prefab": null,
......@@ -3973,16 +4070,16 @@
"_name": "btn_right",
"_objFlags": 0,
"_parent": {
"__id__": 79
"__id__": 81
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 81
"__id__": 83
},
{
"__id__": 82
"__id__": 84
}
],
"_prefab": null,
......@@ -4038,7 +4135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 82
},
"_enabled": true,
"_materials": [
......@@ -4070,7 +4167,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 82
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4138,16 +4235,16 @@
"_name": "btn_play",
"_objFlags": 0,
"_parent": {
"__id__": 79
"__id__": 81
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 84
"__id__": 86
},
{
"__id__": 85
"__id__": 87
}
],
"_prefab": null,
......@@ -4203,7 +4300,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
"__id__": 85
},
"_enabled": true,
"_materials": [
......@@ -4235,7 +4332,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
"__id__": 85
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4303,16 +4400,16 @@
"_name": "btn_stop",
"_objFlags": 0,
"_parent": {
"__id__": 79
"__id__": 81
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 87
"__id__": 89
},
{
"__id__": 88
"__id__": 90
}
],
"_prefab": null,
......@@ -4368,7 +4465,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
"__id__": 88
},
"_enabled": true,
"_materials": [
......@@ -4400,7 +4497,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
"__id__": 88
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4468,7 +4565,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 79
"__id__": 81
},
"_enabled": true,
"_materials": [
......@@ -4500,7 +4597,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
"__id__": 80
},
"_enabled": true,
"_materials": [
......@@ -4520,17 +4617,17 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 77
"__id__": 79
},
"_children": [
{
"__id__": 92
"__id__": 94
}
],
"_active": true,
"_components": [
{
"__id__": 94
"__id__": 96
}
],
"_prefab": null,
......@@ -4586,13 +4683,13 @@
"_name": "ani",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 93
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 93
"__id__": 95
}
],
"_prefab": null,
......@@ -4648,7 +4745,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 92
"__id__": 94
},
"_enabled": true,
"_materials": [
......@@ -4688,7 +4785,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
"__id__": 93
},
"_enabled": true,
"_materials": [
......@@ -4720,23 +4817,23 @@
"_name": "img_voice",
"_objFlags": 0,
"_parent": {
"__id__": 77
"__id__": 79
},
"_children": [
{
"__id__": 96
"__id__": 98
},
{
"__id__": 97
"__id__": 99
},
{
"__id__": 99
"__id__": 101
}
],
"_active": false,
"_components": [
{
"__id__": 101
"__id__": 103
}
],
"_prefab": null,
......@@ -4792,7 +4889,7 @@
"_name": "p1",
"_objFlags": 0,
"_parent": {
"__id__": 95
"__id__": 97
},
"_children": [],
"_active": true,
......@@ -4850,13 +4947,13 @@
"_name": "p2",
"_objFlags": 0,
"_parent": {
"__id__": 95
"__id__": 97
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 98
"__id__": 100
}
],
"_prefab": null,
......@@ -4912,7 +5009,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
"__id__": 99
},
"_enabled": true,
"_materials": [
......@@ -4944,13 +5041,13 @@
"_name": "p3",
"_objFlags": 0,
"_parent": {
"__id__": 95
"__id__": 97
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 100
"__id__": 102
}
],
"_prefab": null,
......@@ -5006,7 +5103,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
"__id__": 101
},
"_enabled": true,
"_materials": [
......@@ -5038,7 +5135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
"__id__": 97
},
"_enabled": true,
"_id": "1b37Xp6IVLg6RciXLxM7OU"
......@@ -5048,7 +5145,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
"__id__": 79
},
"_enabled": true,
"alignMode": 2,
......@@ -5075,7 +5172,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 78
},
"_enabled": true,
"alignMode": 1,
......@@ -5102,13 +5199,13 @@
"_name": "label_word",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 77
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 105
"__id__": 107
}
],
"_prefab": null,
......@@ -5164,7 +5261,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 106
},
"_enabled": true,
"_materials": [
......@@ -5199,13 +5296,13 @@
"_name": "ani_good",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 77
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 107
"__id__": 109
}
],
"_prefab": null,
......@@ -5261,7 +5358,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 108
},
"_enabled": true,
"_materials": [
......@@ -5301,7 +5398,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 77
},
"_enabled": true,
"alignMode": 1,
......@@ -5334,7 +5431,7 @@
"_active": true,
"_components": [
{
"__id__": 110
"__id__": 112
}
],
"_prefab": null,
......@@ -5390,7 +5487,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 109
"__id__": 111
},
"_enabled": true,
"_materials": [
......@@ -5428,7 +5525,7 @@
"_active": true,
"_components": [
{
"__id__": 112
"__id__": 114
}
],
"_prefab": null,
......@@ -5484,7 +5581,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 113
},
"_enabled": true,
"_materials": [
......@@ -5520,13 +5617,13 @@
},
"_children": [
{
"__id__": 114
"__id__": 116
},
{
"__id__": 117
"__id__": 119
},
{
"__id__": 120
"__id__": 122
}
],
"_active": false,
......@@ -5584,11 +5681,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 113
"__id__": 115
},
"_children": [
{
"__id__": 115
"__id__": 117
}
],
"_active": true,
......@@ -5646,13 +5743,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 116
"__id__": 118
}
],
"_prefab": null,
......@@ -5708,7 +5805,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 115
"__id__": 117
},
"_enabled": true,
"_materials": [],
......@@ -5739,11 +5836,11 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 113
"__id__": 115
},
"_children": [
{
"__id__": 118
"__id__": 120
}
],
"_active": true,
......@@ -5801,13 +5898,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 117
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 119
"__id__": 121
}
],
"_prefab": null,
......@@ -5863,7 +5960,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
"__id__": 120
},
"_enabled": true,
"_materials": [],
......@@ -5891,12 +5988,9 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 113
"__id__": 115
},
"_children": [
{
"__id__": 121
},
{
"__id__": 123
},
......@@ -5911,6 +6005,9 @@
},
{
"__id__": 131
},
{
"__id__": 133
}
],
"_active": true,
......@@ -5968,13 +6065,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 120
"__id__": 122
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 122
"__id__": 124
}
],
"_prefab": null,
......@@ -6030,7 +6127,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
"__id__": 123
},
"_enabled": true,
"_clip": {
......@@ -6049,13 +6146,13 @@
"_name": "tip",
"_objFlags": 0,
"_parent": {
"__id__": 120
"__id__": 122
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 124
"__id__": 126
}
],
"_prefab": null,
......@@ -6111,7 +6208,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
"__id__": 125
},
"_enabled": true,
"_clip": {
......@@ -6130,13 +6227,13 @@
"_name": "tosmall",
"_objFlags": 0,
"_parent": {
"__id__": 120
"__id__": 122
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 126
"__id__": 128
}
],
"_prefab": null,
......@@ -6192,7 +6289,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
"__id__": 127
},
"_enabled": true,
"_clip": {
......@@ -6211,13 +6308,13 @@
"_name": "pagenext",
"_objFlags": 0,
"_parent": {
"__id__": 120
"__id__": 122
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 128
"__id__": 130
}
],
"_prefab": null,
......@@ -6273,7 +6370,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 127
"__id__": 129
},
"_enabled": true,
"_clip": {
......@@ -6292,13 +6389,13 @@
"_name": "arrow",
"_objFlags": 0,
"_parent": {
"__id__": 120
"__id__": 122
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
"__id__": 132
}
],
"_prefab": null,
......@@ -6354,7 +6451,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 131
},
"_enabled": true,
"_clip": {
......@@ -6373,13 +6470,13 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 120
"__id__": 122
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 132
"__id__": 134
}
],
"_prefab": null,
......@@ -6435,7 +6532,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 131
"__id__": 133
},
"_enabled": true,
"_clip": {
......@@ -6511,18 +6608,21 @@
"__id__": 59
},
"btn_record": {
"__id__": 77
"__id__": 79
},
"layer_touch": {
"__id__": 15
},
"label_word": {
"__id__": 104
"__id__": 106
},
"ani_good": {
"__id__": 106
"__id__": 108
},
"ani_npc": {
"__id__": 74
},
"img_npc": {
"__id__": 72
},
"btn_last": {
......
......@@ -76,6 +76,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.scoreList = this.list.map(() => 3);
this.maxCurrent = 0;
this.layers = [];
this.readyNext = false;
this.readyTime = 99999;
}
private layers: Array<cc.Node>;
......@@ -91,6 +93,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.touchOn(this.btn_last, this.preLayer, this);
pg.view.touchOn(this.btn_next, this.nextLayer, this);
pg.view.touchOn(this.btn_record, this.onTouchRecord, this);
pg.view.touchOn(this.img_npc, this.onPlayNpc, this);
pg.view.touchOn(this.ani_npc, this.onPlayNpc, this);
let layout_btns = pg.view.find(this.btn_record, "mask/layout_btns");
......@@ -171,9 +174,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.btn_last.active = this.showLastNext > 0 && !!this.LastData;
this.btn_next.active = this.showLastNext > 0 && !!this.NextData;
}
private readyNext: boolean;
private readyTime: number;
update(dt) {
if (!this.list) return;
this.updateBtns(dt);
this.readyTime -= dt;
if (this.readyNext && this.readyTime <= 0) {
this.readyNext = false;
this.readyTime = 999999;
this.nextLayer();
}
}
//--------------------------------Record-----------------------------
private recordAudio: string;
......@@ -205,6 +216,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
showRecordHide() {
this.showRecordWaitEnd();
this.img_npc.active = false;
this.showLastNext = 3;// 3秒显示时间
let img_voice = pg.view.find(this.btn_record, "img_voice");
img_voice.active = false;
......@@ -252,6 +264,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
private recordAudioId: any;
async showRecorAudioPlay() {
if (!this.recordAudio) return;
this.readyNext = false;
this.readyTime = 999999;
let layout_btns = pg.view.find(this.btn_record, "mask/layout_btns");
let btn_right = pg.view.find(layout_btns, 'btn_right')
......@@ -266,7 +280,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showRecorAudioPlayEnd().then(() => {
this.showNpcAudioPlay().then(() => {
this.showNpcAudioPlayEnd();
this.nextLayer();
this.readyNext = true;
this.readyTime = 3;
})
})
}, audioId => {
......@@ -311,13 +326,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
ani_good: cc.Node = null;
@property(cc.Node)
ani_npc: cc.Node = null;
@property(cc.Node)
img_npc: cc.Node = null;
private npcAudioId: any;
showNpcAudioPlay() {
return new Promise((resolve, reject) => {
this.ani_npc.active = true;
this.img_npc.active = false;
pg.view.playDBAnimation(this.ani_npc, 'newAnimation', 0);
pg.audio.playAudioByUrl(this.CurrentData.npcAudio, () => {
pg.view.playDBAnimation(this.ani_npc, 'newAnimation', 1);
this.ani_npc.active = false;
this.img_npc.active = true;
this.npcAudioId = null;
resolve('');
}, audioId => {
......@@ -339,10 +359,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
// 停止播放录音
onTouchRecordStop() {
this.readyNext = false;
this.readyTime = 999999;
this.showRecorAudioPlayEnd().then(() => {
this.showNpcAudioPlay().then(() => {
this.showNpcAudioPlayEnd();
this.nextLayer();
this.readyNext = true;
this.readyTime = 3;
})
})
}
......@@ -352,10 +375,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showRecorAudioPlay();
}
onPlayNpc() {
this.readyNext = false;
this.readyTime = 999999;
this.showNpcAudioPlayEnd();
this.showNpcAudioPlay().then(() => {
this.showNpcAudioPlayEnd();
this.nextLayer();
this.readyNext = true;
this.readyTime = 3;
})
}
//按钮触发,使用的方法
......@@ -378,7 +404,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showRecordEnd();
let testData = {
"text": "Yes, there is.Yes, there is.Yes, there is.Yes, there is.Yes, there is.Yes, there is.Yes, there is.",
"audio": "https://staging-teach.cdn.ireadabc.com/6ee3ccaa831a884f02c6a75c6f647cb5.wav"
"audioUrl": "https://staging-teach.cdn.ireadabc.com/6ee3ccaa831a884f02c6a75c6f647cb5.wav"
}
if (!courseware) return this.recrodEnd(testData)
courseware && courseware.stopRecord(0, (data) => {
......@@ -389,7 +415,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
async recrodEnd(data) {
this.voiceTouchForbid = false;
this.recordAudio = data.audio;
this.recordAudio = data.audioUrl;
this.recordAudioWord = data.text;
this.recording = false;
this.showRecorAudioPlay();
......
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