Commit 1e36a153 authored by Tt's avatar Tt

调整卡死部分

parent 5b7a1bd5
...@@ -22,6 +22,7 @@ export default class LayerBack extends cc.Component { ...@@ -22,6 +22,7 @@ export default class LayerBack extends cc.Component {
this.unscheduleAllCallbacks(); this.unscheduleAllCallbacks();
} }
initView() { initView() {
this.canTouch = true;
this.bg_forbid = pg.view.find(this, 'bg_forbid') this.bg_forbid = pg.view.find(this, 'bg_forbid')
this.btn_back = pg.view.find(this, 'btn_back') this.btn_back = pg.view.find(this, 'btn_back')
this.label_title = pg.view.find(this, 'label_title') this.label_title = pg.view.find(this, 'label_title')
...@@ -51,19 +52,22 @@ export default class LayerBack extends cc.Component { ...@@ -51,19 +52,22 @@ export default class LayerBack extends cc.Component {
} }
private playVoiceCount: number; private playVoiceCount: number;
private audioId: number; private audioId: number;
private canTouch: boolean;
playVoiceStart() { playVoiceStart() {
if (this.playVoiceCount > 0) { if (!this.canTouch) return;
if (this.audioId) cc.audioEngine.stopEffect(this.audioId); this.canTouch = false;
this.playVoiceEnd(); if (this.audioId) cc.audioEngine.stopEffect(this.audioId);
} this.playVoiceEnd();
this.playVoiceCount = 0; this.playVoiceCount = 0;
this.schedule(this.playVoiceRunning, 0.3) this.schedule(this.playVoiceRunning, 0.3)
pg.audio.playAudioByUrl(this.npcAudio, () => { pg.audio.playAudioByUrl(this.npcAudio, () => {
this.audioId = null;
this.playVoiceEnd(); this.playVoiceEnd();
pg.view.visible(this.bg_forbid, false) pg.view.visible(this.bg_forbid, false)
pg.event.emit('npc_voice_play_voice_end') pg.event.emit('npc_voice_play_voice_end')
}, (audioId) => { }, (audioId) => {
this.audioId = audioId; this.audioId = audioId;
this.canTouch = true;
}); });
} }
playVoiceRunning() { playVoiceRunning() {
......
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 150.74, "width": 148.45,
"height": 63 "height": 63
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -529,7 +529,7 @@ ...@@ -529,7 +529,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
208.95399999999995, 206.664,
0, 0,
0, 0,
0, 0,
......
...@@ -21,17 +21,17 @@ ...@@ -21,17 +21,17 @@
"__id__": 2 "__id__": 2
}, },
{ {
"__id__": 16 "__id__": 17
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 21 "__id__": 22
} }
], ],
"_prefab": { "_prefab": {
"__id__": 22 "__id__": 23
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -92,19 +92,19 @@ ...@@ -92,19 +92,19 @@
"__id__": 3 "__id__": 3
}, },
{ {
"__id__": 6 "__id__": 7
}, },
{ {
"__id__": 9 "__id__": 10
}, },
{ {
"__id__": 12 "__id__": 13
} }
], ],
"_active": false, "_active": false,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 15 "__id__": 16
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -165,10 +165,13 @@ ...@@ -165,10 +165,13 @@
"_components": [ "_components": [
{ {
"__id__": 4 "__id__": 4
},
{
"__id__": 5
} }
], ],
"_prefab": { "_prefab": {
"__id__": 5 "__id__": 6
}, },
"_opacity": 102, "_opacity": 102,
"_color": { "_color": {
...@@ -249,6 +252,16 @@ ...@@ -249,6 +252,16 @@
"_atlas": null, "_atlas": null,
"_id": "" "_id": ""
}, },
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_id": ""
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
...@@ -271,11 +284,11 @@ ...@@ -271,11 +284,11 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 7 "__id__": 8
} }
], ],
"_prefab": { "_prefab": {
"__id__": 8 "__id__": 9
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -329,7 +342,7 @@ ...@@ -329,7 +342,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 6 "__id__": 7
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -386,11 +399,11 @@ ...@@ -386,11 +399,11 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 10 "__id__": 11
} }
], ],
"_prefab": { "_prefab": {
"__id__": 11 "__id__": 12
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -444,7 +457,7 @@ ...@@ -444,7 +457,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 9 "__id__": 10
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -499,11 +512,11 @@ ...@@ -499,11 +512,11 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 13 "__id__": 14
} }
], ],
"_prefab": { "_prefab": {
"__id__": 14 "__id__": 15
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -557,7 +570,7 @@ ...@@ -557,7 +570,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 12 "__id__": 13
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -623,13 +636,13 @@ ...@@ -623,13 +636,13 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 17 "__id__": 18
} }
], ],
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 20 "__id__": 21
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -683,17 +696,17 @@ ...@@ -683,17 +696,17 @@
"_name": "coin", "_name": "coin",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 16 "__id__": 17
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 18 "__id__": 19
} }
], ],
"_prefab": { "_prefab": {
"__id__": 19 "__id__": 20
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -747,7 +760,7 @@ ...@@ -747,7 +760,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
......
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