Commit c11da80d authored by Tt's avatar Tt

字体更换

parent 71cb7148
......@@ -11,14 +11,18 @@ const { ccclass, property } = cc._decorator;
export default class LayerBack extends cc.Component {
private btn_back: cc.Node;
private img_npc_voice: cc.Node;
private bg_forbid: cc.Node;
onLoad() {
this.initView();
this.initEvent();
}
private label_title: cc.Node;
protected onDestroy(): void {
this.unscheduleAllCallbacks();
}
initView() {
this.bg_forbid = pg.view.find(this, 'bg_forbid')
this.btn_back = pg.view.find(this, 'btn_back')
this.label_title = pg.view.find(this, 'label_title')
this.img_npc_voice = pg.view.find(this.label_title, 'img_npc_voice')
......@@ -27,8 +31,8 @@ export default class LayerBack extends cc.Component {
private npcTitle: string;
private npcAudio: string;
updateView(data) {
this.npcTitle = data.npcTitle || '';
this.npcAudio = data.npcAudio || '';
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);
......@@ -38,6 +42,7 @@ export default class LayerBack extends cc.Component {
pg.event.on('npc_layer_back_init', (data) => {
this.updateView(data);
if (!this.npcAudio) {
pg.view.visible(this.bg_forbid, false)
pg.event.emit('npc_voice_play_voice_end');
} else {
this.playVoiceStart();
......@@ -55,6 +60,7 @@ export default class LayerBack extends cc.Component {
this.schedule(this.playVoiceRunning, 0.3)
pg.audio.playAudioByUrl(this.npcAudio, () => {
this.playVoiceEnd();
pg.view.visible(this.bg_forbid, false)
pg.event.emit('npc_voice_play_voice_end')
}, (audioId) => {
this.audioId = audioId;
......@@ -62,6 +68,7 @@ export default class LayerBack extends cc.Component {
}
playVoiceRunning() {
this.playVoiceCount++;
if (!this.img_npc_voice) return;
let p1 = this.img_npc_voice.getChildByName('p1')
let p2 = this.img_npc_voice.getChildByName('p2')
let p3 = this.img_npc_voice.getChildByName('p3')
......
......@@ -21,20 +21,23 @@
"__id__": 2
},
{
"__id__": 7
"__id__": 6
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 22
"__id__": 27
},
{
"__id__": 23
"__id__": 28
}
],
"_prefab": {
"__id__": 24
"__id__": 29
},
"_opacity": 255,
"_color": {
......@@ -85,7 +88,7 @@
},
{
"__type__": "cc.Node",
"_name": "btn_back",
"_name": "bg_forbid",
"_objFlags": 0,
"_parent": {
"__id__": 1
......@@ -98,13 +101,128 @@
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_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": ""
},
{
"__id__": 5
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "07DTTDThBNdJCrgpsUtJSh",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btn_back",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
},
{
"__id__": 8
},
{
"__id__": 9
}
],
"_prefab": {
"__id__": 6
"__id__": 10
},
"_opacity": 255,
"_color": {
......@@ -158,7 +276,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 6
},
"_enabled": true,
"_materials": [
......@@ -190,7 +308,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 6
},
"_enabled": true,
"_normalMaterial": null,
......@@ -258,7 +376,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 6
},
"_enabled": true,
"alignMode": 1,
......@@ -300,17 +418,20 @@
},
"_children": [
{
"__id__": 8
"__id__": 12
}
],
"_active": true,
"_components": [
{
"__id__": 20
"__id__": 24
},
{
"__id__": 25
}
],
"_prefab": {
"__id__": 21
"__id__": 26
},
"_opacity": 255,
"_color": {
......@@ -364,27 +485,27 @@
"_name": "img_npc_voice",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 11
},
"_children": [
{
"__id__": 9
"__id__": 13
},
{
"__id__": 12
"__id__": 16
},
{
"__id__": 15
"__id__": 19
}
],
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 22
}
],
"_prefab": {
"__id__": 19
"__id__": 23
},
"_opacity": 255,
"_color": {
......@@ -438,17 +559,17 @@
"_name": "p1",
"_objFlags": 0,
"_parent": {
"__id__": 8
"__id__": 12
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
"__id__": 14
}
],
"_prefab": {
"__id__": 11
"__id__": 15
},
"_opacity": 255,
"_color": {
......@@ -502,7 +623,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
"__id__": 13
},
"_enabled": true,
"_materials": [
......@@ -545,17 +666,17 @@
"_name": "p2",
"_objFlags": 0,
"_parent": {
"__id__": 8
"__id__": 12
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 13
"__id__": 17
}
],
"_prefab": {
"__id__": 14
"__id__": 18
},
"_opacity": 255,
"_color": {
......@@ -609,7 +730,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
"__id__": 16
},
"_enabled": true,
"_materials": [
......@@ -652,17 +773,17 @@
"_name": "p3",
"_objFlags": 0,
"_parent": {
"__id__": 8
"__id__": 12
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 16
"__id__": 20
}
],
"_prefab": {
"__id__": 17
"__id__": 21
},
"_opacity": 255,
"_color": {
......@@ -716,7 +837,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
"__id__": 19
},
"_enabled": true,
"_materials": [
......@@ -759,7 +880,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 12
},
"_enabled": true,
"alignMode": 2,
......@@ -797,7 +918,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 11
},
"_enabled": true,
"_materials": [
......@@ -827,6 +948,33 @@
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 274.52700000000004,
"_right": 0,
"_top": 67.39999999999998,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
......
......@@ -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",
......
......@@ -21,7 +21,8 @@ export default class LayerEnding extends cc.Component {
pg.view.touchOn(this.replay_btn, this.onTouchReplay, this)
pg.view.touchOn(this.next_btn, this.onTouchNext, this)
pg.event.on('layer_ending_show', (data) => {
this.showLayer(data);
// this.showLayer(data);
this.onTouchNext();
})
}
showLayer(data) {
......
......@@ -13,6 +13,9 @@ export default class ImgVoice extends cc.Component {
this.initView();
this.initEvent();
}
protected onDestroy(): void {
this.unscheduleAllCallbacks();
}
initView() {
this.img_npc_voice = this.node;
}
......@@ -31,6 +34,7 @@ export default class ImgVoice extends cc.Component {
this.schedule(this.playVoiceRunning, 0.3)
}
playVoiceRunning() {
if (!this.img_npc_voice) return;
this.playVoiceCount++;
let p1 = this.img_npc_voice.getChildByName('p1')
let p2 = this.img_npc_voice.getChildByName('p2')
......
......@@ -25,6 +25,9 @@ export default class LayerRecord extends cc.Component {
this.initEvent();
this.showVoiceWhite();
}
protected onDestroy(): void {
this.unscheduleAllCallbacks();
}
private letter: string;
private targetTime: number;
private recordAudio: string;
......@@ -115,6 +118,7 @@ export default class LayerRecord extends cc.Component {
playVoiceRunning() {
this.playVoiceCount++;
let btn_play = pg.view.find(this.layout_record, 'btn_play');
if (!btn_play) return;
let p0 = btn_play.getChildByName('p0')
let p1 = btn_play.getChildByName('p1')
let p2 = btn_play.getChildByName('p2')
......
......@@ -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",
......
......@@ -11,7 +11,7 @@
"height": 16,
"platformSettings": {},
"subMetas": {
"i7_hy17_hds": {
"i7_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "4c1ec0cb-3f12-4f6a-8842-4bc9a8d30595",
"rawTextureUuid": "588386de-1521-4292-b7d7-17c8f29aa65e",
......
......@@ -11,7 +11,7 @@
"height": 25,
"platformSettings": {},
"subMetas": {
"i8_hy17_hds": {
"i8_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "d3038178-fbd6-48e9-865b-6dd1c3175a4d",
"rawTextureUuid": "13c723a8-348a-43ef-b389-a8bc852e12bd",
......
......@@ -11,7 +11,7 @@
"height": 36,
"platformSettings": {},
"subMetas": {
"i9_hy17_hds": {
"i9_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "f7b9f86e-e501-494c-86aa-e58f088b8c70",
"rawTextureUuid": "e82a7b7d-6112-478f-beae-cc9884c10694",
......
......@@ -11,7 +11,7 @@
"height": 426,
"platformSettings": {},
"subMetas": {
"pic_light_hy17_hds": {
"pic_light_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "ebe797e6-b395-4cf5-9d84-5ae5a2ca153c",
"rawTextureUuid": "1ceaac4e-845d-431a-9170-04cc6d3f90c8",
......
......@@ -11,7 +11,7 @@
"height": 150,
"platformSettings": {},
"subMetas": {
"p0_hy17_hds": {
"p0_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "c9eb055f-e3e0-4f6e-9e05-45d7c4608877",
"rawTextureUuid": "dd5d53aa-0ec7-4476-a807-42f251d89b87",
......
......@@ -11,7 +11,7 @@
"height": 150,
"platformSettings": {},
"subMetas": {
"p1_hy17_hds": {
"p1_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "84c11178-f263-4e14-aa51-104545bb5499",
"rawTextureUuid": "422dcc2c-0347-46ab-88d9-a167e71390ac",
......
......@@ -11,7 +11,7 @@
"height": 150,
"platformSettings": {},
"subMetas": {
"p2_hy17_hds": {
"p2_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "79273752-abd4-4f1c-90d6-790e6a7d507c",
"rawTextureUuid": "27ef14bc-6d9a-4418-b9be-57fa7debf46f",
......
......@@ -11,7 +11,7 @@
"height": 150,
"platformSettings": {},
"subMetas": {
"p3_hy17_hds": {
"p3_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "15171692-6cb7-462b-aca3-86891a8c425a",
"rawTextureUuid": "0a711ec1-92b8-4ff7-b0f5-feb00b6a2c24",
......
......@@ -11,7 +11,7 @@
"height": 162,
"platformSettings": {},
"subMetas": {
"record_bg_hy17_hds": {
"record_bg_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "9ca32a61-c62c-4a19-92f0-3108a36b6049",
"rawTextureUuid": "9c3873f5-0f12-4520-afea-c0ed25db2900",
......
......@@ -11,7 +11,7 @@
"height": 140,
"platformSettings": {},
"subMetas": {
"record_icon_hy17_hds": {
"record_icon_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "2e3bd73f-da94-4921-be21-5acaaa12f138",
"rawTextureUuid": "41437958-b6ab-422b-9f58-8762b3975e11",
......
......@@ -11,7 +11,7 @@
"height": 131,
"platformSettings": {},
"subMetas": {
"record_time_hy17_hds": {
"record_time_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "0907d9b3-c15d-444d-94cb-42a9523ca2d1",
"rawTextureUuid": "a1813758-d06f-450c-b4e1-ecdea7d5668b",
......
......@@ -11,7 +11,7 @@
"height": 184,
"platformSettings": {},
"subMetas": {
"voice_white_hy17_hds": {
"voice_white_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "4a26b10f-d021-4bad-ac0e-f513daa05ae5",
"rawTextureUuid": "de7b6722-7804-402d-93f0-1eb866a83834",
......
......@@ -11,7 +11,7 @@
"height": 106,
"platformSettings": {},
"subMetas": {
"v1_hy17_hds": {
"v1_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "5d6944d6-a8e5-4fb1-8a51-398599119594",
"rawTextureUuid": "88a816bc-c8ae-4ba8-9779-60efbf0ccf12",
......
......@@ -11,7 +11,7 @@
"height": 106,
"platformSettings": {},
"subMetas": {
"v2_hy17_hds": {
"v2_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "d1a502ee-14cf-4c20-95e9-e8132e334e85",
"rawTextureUuid": "ea3203e3-fd33-49a4-ac3d-7f08003a120b",
......
......@@ -11,7 +11,7 @@
"height": 106,
"platformSettings": {},
"subMetas": {
"v3_hy17_hds": {
"v3_hy06_danxuan": {
"ver": "1.0.4",
"uuid": "422c2578-4308-4ecb-b662-e6f8ac2f7012",
"rawTextureUuid": "038cbd16-2bda-4ba7-ab31-5f0a2c07cf05",
......
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