Commit 21dd9102 authored by limingzhe's avatar limingzhe

fix: 清内存

parent eaaaff71
{"ver":"1.1.2","uuid":"70bc04c3-e5e3-4c70-8f48-a26ea3453ebd","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}} {"ver":"1.1.2","uuid":"9885d167-7e00-428c-b5ab-c26cc063e331","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file \ No newline at end of file
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "ffb16d4b-3e4d-411a-9451-d8cb9fd00fa0", "uuid": "00c27356-4548-4344-94dc-aca3d9c85262",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
{ {
"ver": "2.0.1", "ver": "2.0.1",
"uuid": "345a2bb3-6c63-403e-9ca1-24ab794903bc", "uuid": "699d9bc8-2d7d-4b47-98d1-edcb9d241ede",
"downloadMode": 0, "downloadMode": 0,
"duration": 1.1755, "duration": 1.1755,
"subMetas": {} "subMetas": {}
......
{ {
"ver": "2.0.1", "ver": "2.0.1",
"uuid": "8216d147-d91c-4528-8781-96f07b6e54a2", "uuid": "d4105d64-d01c-4e6c-984d-28fb6b4bcb07",
"downloadMode": 0, "downloadMode": 0,
"duration": 5.112, "duration": 5.112,
"subMetas": {} "subMetas": {}
......
{ {
"ver": "2.0.1", "ver": "2.0.1",
"uuid": "971c3859-f589-46aa-83d8-aa24632c7243", "uuid": "00a15000-f199-435b-9bcd-291aa5d1d432",
"downloadMode": 0, "downloadMode": 0,
"duration": 4.362449, "duration": 4.362449,
"subMetas": {} "subMetas": {}
......
{ {
"ver": "2.0.1", "ver": "2.0.1",
"uuid": "05cf2f75-2b5e-4433-a428-e44d1b302731", "uuid": "02851aed-506b-4c06-a1cc-d14c11ee735c",
"downloadMode": 0, "downloadMode": 0,
"duration": 2.592, "duration": 2.592,
"subMetas": {} "subMetas": {}
......
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "aec7963b-8cd0-4efa-8d7d-1189d3a86ca7", "uuid": "8ebb7c56-aa5b-412c-881a-05e951c528d2",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "ffac39cb-d042-40fa-9232-6a6af7d106bb", "uuid": "c23836af-d983-430b-b132-1edd4aeedac0",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
{ {
"ver": "1.0.1", "ver": "1.0.1",
"uuid": "712ee0fa-2ebd-4da2-8eb8-8888b26aebe0", "uuid": "ce33ffb2-0506-4d04-a61f-560a0ff93356",
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{ {
"ver": "1.0.1", "ver": "1.0.1",
"uuid": "05ddf8ee-3027-4539-b908-386e8a4793b6", "uuid": "a3732e00-fdd7-44fd-95b1-47ef94d35f67",
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "ddc0cf9e-be99-4f06-80f0-9ddfeb4c6883", "uuid": "46e882c6-14a7-4471-9945-985d8e6f5fb3",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"徽章动画_tex": { "徽章动画_tex": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "409538b5-7347-4ffb-9231-5d3e04c1ccb5", "uuid": "a646175c-c42b-4989-946a-b93fbe551bb1",
"rawTextureUuid": "ddc0cf9e-be99-4f06-80f0-9ddfeb4c6883", "rawTextureUuid": "46e882c6-14a7-4471-9945-985d8e6f5fb3",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "a288abbb-cf54-45eb-8425-3149865c1fa1", "uuid": "f30cee40-2916-4116-ab24-2aa87fc4bcc4",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
{ {
"ver": "1.0.1", "ver": "1.0.1",
"uuid": "24e3c132-6f4b-471c-bbbd-ee6b2222b96f", "uuid": "9b587aa6-b207-40ff-ab30-0e33f8342b78",
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{ {
"ver": "1.0.1", "ver": "1.0.1",
"uuid": "b54daf60-2609-42f6-90ec-1cced6c45a0e", "uuid": "802057e3-285d-4a90-a658-120020ce6bbb",
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "86a6ed96-65f3-4886-87ed-7b09952baba9", "uuid": "11323465-2322-43f5-a9a3-70732a8d6a3b",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"hand_tex": { "hand_tex": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "56fad7b0-462e-4f2b-99c3-ea246095c2fb", "uuid": "71811c5d-50bb-464e-a1ec-cc94c0535753",
"rawTextureUuid": "86a6ed96-65f3-4886-87ed-7b09952baba9", "rawTextureUuid": "11323465-2322-43f5-a9a3-70732a8d6a3b",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "ed983827-3ad1-4660-995b-e388237b6abd", "uuid": "fe88c649-558a-426e-ad6f-af0583067035",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
{ {
"ver": "1.1.0", "ver": "1.1.0",
"uuid": "673b7859-cec2-4408-93a1-e88a18526074", "uuid": "6cda5116-82bb-44cb-a57c-abb186367415",
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{ {
"ver": "1.1.0", "ver": "1.1.0",
"uuid": "860496c7-a863-46d7-8a96-cf75e852da23", "uuid": "f37d95fe-8b38-4052-906e-519fc65323f2",
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "df0821bd-02cc-43df-8749-f0a821be960e", "uuid": "74c317eb-d6eb-494c-80c2-7fc602b18419",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_id": "9ef4faa1-84f0-4742-95d2-d2eaf214f37d" "_id": "4a29e4b1-f8b4-4b6a-b305-7d4b475e23a1"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
"_cacheMode": 0, "_cacheMode": 0,
"playTimes": -1, "playTimes": -1,
"premultipliedAlpha": false, "premultipliedAlpha": false,
"_armatureKey": "24e3c132-6f4b-471c-bbbd-ee6b2222b96f#b54daf60-2609-42f6-90ec-1cced6c45a0e", "_armatureKey": "9b587aa6-b207-40ff-ab30-0e33f8342b78#802057e3-285d-4a90-a658-120020ce6bbb",
"_accTime": 0, "_accTime": 0,
"_playCount": 0, "_playCount": 0,
"_frameCache": null, "_frameCache": null,
...@@ -328,10 +328,10 @@ ...@@ -328,10 +328,10 @@
"_playing": false, "_playing": false,
"_armatureCache": null, "_armatureCache": null,
"_N$dragonAsset": { "_N$dragonAsset": {
"__uuid__": "24e3c132-6f4b-471c-bbbd-ee6b2222b96f" "__uuid__": "9b587aa6-b207-40ff-ab30-0e33f8342b78"
}, },
"_N$dragonAtlasAsset": { "_N$dragonAtlasAsset": {
"__uuid__": "b54daf60-2609-42f6-90ec-1cced6c45a0e" "__uuid__": "802057e3-285d-4a90-a658-120020ce6bbb"
}, },
"_N$_defaultArmatureIndex": 0, "_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1, "_N$_animationIndex": 1,
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
"_cacheMode": 0, "_cacheMode": 0,
"playTimes": -1, "playTimes": -1,
"premultipliedAlpha": false, "premultipliedAlpha": false,
"_armatureKey": "712ee0fa-2ebd-4da2-8eb8-8888b26aebe0#05ddf8ee-3027-4539-b908-386e8a4793b6", "_armatureKey": "ce33ffb2-0506-4d04-a61f-560a0ff93356#a3732e00-fdd7-44fd-95b1-47ef94d35f67",
"_accTime": 0, "_accTime": 0,
"_playCount": 0, "_playCount": 0,
"_frameCache": null, "_frameCache": null,
...@@ -430,10 +430,10 @@ ...@@ -430,10 +430,10 @@
"_playing": false, "_playing": false,
"_armatureCache": null, "_armatureCache": null,
"_N$dragonAsset": { "_N$dragonAsset": {
"__uuid__": "712ee0fa-2ebd-4da2-8eb8-8888b26aebe0" "__uuid__": "ce33ffb2-0506-4d04-a61f-560a0ff93356"
}, },
"_N$dragonAtlasAsset": { "_N$dragonAtlasAsset": {
"__uuid__": "05ddf8ee-3027-4539-b908-386e8a4793b6" "__uuid__": "a3732e00-fdd7-44fd-95b1-47ef94d35f67"
}, },
"_N$_defaultArmatureIndex": 0, "_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1, "_N$_animationIndex": 1,
...@@ -655,7 +655,7 @@ ...@@ -655,7 +655,7 @@
"_lineHeight": 40, "_lineHeight": 40,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": { "_N$file": {
"__uuid__": "673b7859-cec2-4408-93a1-e88a18526074" "__uuid__": "6cda5116-82bb-44cb-a57c-abb186367415"
}, },
"_isSystemFontUsed": false, "_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
...@@ -748,7 +748,7 @@ ...@@ -748,7 +748,7 @@
"_lineHeight": 40, "_lineHeight": 40,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": { "_N$file": {
"__uuid__": "860496c7-a863-46d7-8a96-cf75e852da23" "__uuid__": "f37d95fe-8b38-4052-906e-519fc65323f2"
}, },
"_isSystemFontUsed": false, "_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
...@@ -919,7 +919,7 @@ ...@@ -919,7 +919,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "21c46819-635d-44f1-8802-24eed947ec47" "__uuid__": "7970e7a4-3344-4654-869e-7d86525d538f"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1009,7 +1009,7 @@ ...@@ -1009,7 +1009,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "3c775c24-d497-4961-bef3-c07596a41a72" "__uuid__": "17c172fa-3ad0-4f60-a6b7-a2e8cee68772"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1099,7 +1099,7 @@ ...@@ -1099,7 +1099,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "5da77720-589f-4569-80d9-9b1718a36c81" "__uuid__": "5b6844fd-84de-4a0b-a953-94fde6c64547"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1189,7 +1189,7 @@ ...@@ -1189,7 +1189,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "5ed3c2b7-e11c-468f-98a4-99264a4377a4" "__uuid__": "9bc3a9ad-b2e2-4811-b037-148edbc3224e"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1279,7 +1279,7 @@ ...@@ -1279,7 +1279,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "0c4f7341-41d9-4cea-a05d-6777dddb3b86" "__uuid__": "0a814c8c-7ec2-49fe-84a1-82cb2d97397c"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1369,7 +1369,7 @@ ...@@ -1369,7 +1369,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "236c2bbd-77a1-4f2e-b4c1-7338f549a8d5" "__uuid__": "c76ff575-367c-4f43-bed2-2673f9bbeb91"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1459,7 +1459,7 @@ ...@@ -1459,7 +1459,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "9231a078-9119-4563-af21-88c1a2720b6b" "__uuid__": "f9729f00-7d67-4824-808e-db4f2743b2ad"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1549,7 +1549,7 @@ ...@@ -1549,7 +1549,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "f14ac956-031f-41f0-8fb4-4b00647c02f7" "__uuid__": "7c55e90a-88f6-4947-baa2-b9a67ba52f5d"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1704,7 +1704,7 @@ ...@@ -1704,7 +1704,7 @@
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
"__uuid__": "05cf2f75-2b5e-4433-a428-e44d1b302731" "__uuid__": "02851aed-506b-4c06-a1cc-d14c11ee735c"
}, },
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
...@@ -1785,7 +1785,7 @@ ...@@ -1785,7 +1785,7 @@
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
"__uuid__": "8216d147-d91c-4528-8781-96f07b6e54a2" "__uuid__": "d4105d64-d01c-4e6c-984d-28fb6b4bcb07"
}, },
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
...@@ -1866,7 +1866,7 @@ ...@@ -1866,7 +1866,7 @@
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
"__uuid__": "971c3859-f589-46aa-83d8-aa24632c7243" "__uuid__": "00a15000-f199-435b-9bcd-291aa5d1d432"
}, },
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
...@@ -1921,7 +1921,7 @@ ...@@ -1921,7 +1921,7 @@
"_id": "29zXboiXFBKoIV4PQ2liTe" "_id": "29zXboiXFBKoIV4PQ2liTe"
}, },
{ {
"__type__": "01bc5whNeBN97RckeHba7w2", "__type__": "e7337yMRQxG+661GqZYnBz7",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
......
{ {
"ver": "1.2.9", "ver": "1.2.9",
"uuid": "9ef4faa1-84f0-4742-95d2-d2eaf214f37d", "uuid": "4a29e4b1-f8b4-4b6a-b305-7d4b475e23a1",
"asyncLoadAssets": false, "asyncLoadAssets": false,
"autoReleaseAssets": false, "autoReleaseAssets": true,
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
import { asyncDelay, asyncLoadDragonBoneAnime, callMiddleLayerFunction, onHomeworkFinish, playAudio } from "../script/util"; import { asyncDelay, callMiddleLayerFunction, onHomeworkFinish, playAudio } from "../script/util";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent"; import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
...@@ -13,22 +13,26 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -13,22 +13,26 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAudio() { addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源 // TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: (this.data.lrcData && this.data.lrcData.audio_url) || '' }); this._audioResList.push({ url: (this.data.lrcData && this.data.lrcData.audio_url) || ''});
} }
animBaseUrl;
addPreloadAnima() { addPreloadAnima() {
console.log('this.data: ' + JSON.stringify(this.data)); console.log('this.data: ' + JSON.stringify(this.data));
if (this.data?.skeJsonData?.url) { if (this.data?.skeJsonData?.url) {
this.animBaseUrl = this.data.skeJsonData.ur;
console.log('this.animBaseUrl: ' + this.animBaseUrl );
this.data.skeJsonData.url += '?time=' + new Date().getTime() this.data.skeJsonData.url += '?time=' + new Date().getTime()
this.data.texJsonData.url += '?time=' + new Date().getTime() this.data.texJsonData.url += '?time=' + new Date().getTime()
this.data.texPngData.url += '?time=' + new Date().getTime() this.data.texPngData.url += '?time=' + new Date().getTime()
} }
this._animaResList.push({ url: this.data.skeJsonData.url || '' }); this._animaResList.push({ url: this.data.skeJsonData.url || '' });
this._animaResList.push({ url: this.data.texJsonData.url || '' }); this._animaResList.push({ url: this.data.texJsonData.url || ''});
this._animaResList.push({ url: this.data.texPngData.url || '' }); this._animaResList.push({ url: this.data.texPngData.url || ''});
} }
onLoadEnd() { onLoadEnd() {
...@@ -44,8 +48,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -44,8 +48,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
let isAnimLoaded = false; let isAnimLoaded = false;
const checkStart = () => { const checkStart = () => {
console.log(' in checkStart: ', isDataLoaded) console.log( ' in checkStart: ', isDataLoaded)
console.log(' in isAnimLoaded: ', isAnimLoaded) console.log( ' in isAnimLoaded: ', isAnimLoaded)
if (isDataLoaded && isAnimLoaded) { if (isDataLoaded && isAnimLoaded) {
window["air"].hideAirClassLoading(); window["air"].hideAirClassLoading();
...@@ -92,7 +96,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -92,7 +96,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.isFirst = data.first; //this.checkIsFirst(); this.isFirst = data.first; //this.checkIsFirst();
this.isLast = data.last // this.checkIsLast(); this.isLast = data.last // this.checkIsLast();
this.playTimes = data.playTime // this.checkPlayTimes(); this.playTimes = data.playTime// this.checkPlayTimes();
this.jumpData = data.saveData // this.getJumpData(); this.jumpData = data.saveData // this.getJumpData();
if (this.data.isDebug) { if (this.data.isDebug) {
...@@ -144,7 +148,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -144,7 +148,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
return; return;
} }
for (let i = 0; i < lyrics.length; i++) { for (let i=0; i<lyrics.length; i++) {
const data = lyrics[i].data; const data = lyrics[i].data;
if (!data) { if (!data) {
...@@ -155,10 +159,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -155,10 +159,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
let duration = 0; let duration = 0;
if (i != lyrics.length - 1) { if (i != lyrics.length - 1) {
duration = lyrics[i + 1].time - lyrics[i].time; duration = lyrics[i+1].time - lyrics[i].time;
} }
this.textArr.push({ data, time, duration }); this.textArr.push({data, time, duration});
} }
} }
...@@ -179,7 +183,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -179,7 +183,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initView() { initView() {
console.log(' in initView') console.log( ' in initView')
if (this.jumpData) { if (this.jumpData) {
this.junpAnim(); this.junpAnim();
...@@ -203,10 +207,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -203,10 +207,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
junpAnim() { junpAnim() {
const jumpFrame = this.getJumpFrame(); const jumpFrame = this.getJumpFrame();
this.dragonDisplay.timeScale = jumpFrame; this.dragonDisplay.timeScale = jumpFrame;
this.dragonDisplay.playAnimation(this.animaNode.animationNames[0], 1);
this.dragonDisplay.armatureName = this.dragonDisplay.getArmatureNames()[0];
const animationName = this.dragonDisplay.getAnimationNames(this.dragonDisplay.armatureName)[0];
this.dragonDisplay.playAnimation(animationName, 1);
} }
getJumpFrame() { getJumpFrame() {
...@@ -219,9 +220,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -219,9 +220,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
let disFrame = maxDisFrame; let disFrame = maxDisFrame;
for (let i = 1; i < arr.length; i++) { for (let i=1; i<arr.length; i++) {
const curDis = (arr[i].text - arr[i - 1].text) / 2; const curDis = (arr[i].text - arr[i-1].text) / 2;
if (disFrame > curDis) { if (disFrame > curDis) {
disFrame = curDis; disFrame = curDis;
} }
...@@ -263,10 +264,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -263,10 +264,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
lightLeft.rotation = 45; lightLeft.rotation = 45;
lightLeft.opacity = 0; lightLeft.opacity = 0;
cc.tween(lightLeft) cc.tween(lightLeft)
.to(1, { rotation: -45 }, { easing: "cubicOut" }) .to(1, {rotation: -45}, {easing: "cubicOut"})
.start(); .start();
cc.tween(lightLeft) cc.tween(lightLeft)
.to(0.5, { opacity: 255 }) .to(0.5, {opacity: 255})
.start(); .start();
const lightRight = this.getSprNode('light'); const lightRight = this.getSprNode('light');
...@@ -279,10 +280,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -279,10 +280,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
lightRight.rotation = -45; lightRight.rotation = -45;
lightRight.opacity = 0; lightRight.opacity = 0;
cc.tween(lightRight) cc.tween(lightRight)
.to(1, { rotation: 45 }, { easing: "cubicOut" }) .to(1, {rotation: 45}, {easing: "cubicOut"})
.start(); .start();
cc.tween(lightRight) cc.tween(lightRight)
.to(0.5, { opacity: 255 }) .to(0.5, {opacity: 255})
.start(); .start();
...@@ -309,7 +310,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -309,7 +310,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.startAudioEnd(); this.startAudioEnd();
})); }));
}) })
.to(1.5, { y: 0 }, { easing: "elasticOut" }) .to(1.5, {y: 0}, {easing: "elasticOut"})
.start(); .start();
this.title = title this.title = title
...@@ -337,13 +338,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -337,13 +338,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
sprNode.opacity = 0; sprNode.opacity = 0;
cc.tween(sprNode) cc.tween(sprNode)
.to(time / 10, { opacity: 255 }) .to(time/10, {opacity: 255})
.start(); .start();
cc.tween(sprNode) cc.tween(sprNode)
.to(0.8 * time, { scale: this._mapScaleMin }, { easing: 'elasticOut' }) .to(0.8 * time, {scale: this._mapScaleMin}, {easing: 'elasticOut'})
.delay(0 * time) .delay(0 * time)
.to(0.2 * time, { opacity: 0 }) .to(0.2 * time, {opacity: 0})
.start(); .start();
} }
...@@ -376,9 +377,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -376,9 +377,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
async hideStartView() { async hideStartView() {
const hideSpr = (sprNode, cb = null) => { const hideSpr = (sprNode, cb=null) => {
cc.tween(sprNode) cc.tween(sprNode)
.to(0.3, { opacity: 0 }) .to(0.3, {opacity: 0})
.call(() => { .call(() => {
sprNode.active = false; sprNode.active = false;
cb && cb(); cb && cb();
...@@ -401,10 +402,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -401,10 +402,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
startAnim() { startAnim() {
if (this.animaNode) { if (this.animaNode) {
this.dragonDisplay.armatureName = this.dragonDisplay.getArmatureNames()[0];
const animationName = this.dragonDisplay.getAnimationNames(this.dragonDisplay.armatureName)[0];
this.dragonDisplay.playAnimation(animationName, 1); this.dragonDisplay.playAnimation(this.animaNode.animationNames[0], 1);
this.dragonDisplay.timeScale = 1; this.dragonDisplay.timeScale = 1;
} }
...@@ -431,7 +430,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -431,7 +430,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
callMiddleLayerFunction('PSQS_jump_to_question', { step: id }, null) callMiddleLayerFunction('PSQS_jump_to_question', {step: id}, null)
return; return;
} }
...@@ -476,8 +475,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -476,8 +475,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
// this.delayDeleteAnim(); // this.delayDeleteAnim();
hand.removeFromParent();
console.log('PSQS_show_rabbit 2') console.log('PSQS_show_rabbit 2')
callMiddleLayerFunction('PSQS_jump_to_question', { step: id }, null) callMiddleLayerFunction('PSQS_jump_to_question', {step: id}, null)
// }) // })
}) })
} }
...@@ -490,6 +490,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -490,6 +490,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
middleLayer.myAnimNode = null; middleLayer.myAnimNode = null;
return;
let dragonDisplay = this.animaNode.getComponent(dragonBones.ArmatureDisplay); let dragonDisplay = this.animaNode.getComponent(dragonBones.ArmatureDisplay);
const oldAtlas = dragonDisplay.dragonAtlasAsset; const oldAtlas = dragonDisplay.dragonAtlasAsset;
...@@ -502,22 +505,23 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -502,22 +505,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.delayRelease(oldAtlas, oldAsset, this.animaNode); this.delayRelease(oldAtlas, oldAsset, this.animaNode);
console.log(' setOneAnima 101')
// console.log(' setOneAnima 101')
this.animaNode.removeComponent(dragonBones.ArmatureDisplay) this.animaNode.removeComponent(dragonBones.ArmatureDisplay)
dragonDisplay = this.animaNode.addComponent(dragonBones.ArmatureDisplay); // dragonDisplay = this.animaNode.addComponent(dragonBones.ArmatureDisplay);
const handBase = cc.find("Canvas/hand"); // const handBase = cc.find("Canvas/hand");
const hand = cc.instantiate(handBase); // const hand = cc.instantiate(handBase);
hand.active = true; // hand.active = true;
const handDisplay = hand.getComponent(dragonBones.ArmatureDisplay) // const handDisplay = hand.getComponent(dragonBones.ArmatureDisplay)
// const atlas = new dragonBones.DragonBonesAtlasAsset(); // // const atlas = new dragonBones.DragonBonesAtlasAsset();
// const asset = new dragonBones.DragonBonesAsset(); // // const asset = new dragonBones.DragonBonesAsset();
dragonDisplay.dragonAtlasAsset = handDisplay.dragonAtlasAsset; // dragonDisplay.dragonAtlasAsset = handDisplay.dragonAtlasAsset;
dragonDisplay.dragonAsset = handDisplay.dragonAsset; // dragonDisplay.dragonAsset = handDisplay.dragonAsset;
console.log('汪汪汪 21') // console.log('汪汪汪 21')
oldAsset.decRef(); oldAsset.decRef();
...@@ -544,7 +548,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -544,7 +548,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
jumpAudio(id) { jumpAudio(id) {
console.log('in jumpAudio id: ', id); console.log('in jumpAudio id: ', id);
const stepData = this.data.stepArr[id - 1]; const stepData = this.data.stepArr[id-1];
console.log('stepData: ', stepData); console.log('stepData: ', stepData);
const time = stepData.text / this.data.frame; const time = stepData.text / this.data.frame;
...@@ -607,13 +611,19 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -607,13 +611,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
const dragonDisplay = goodjob.getComponent(dragonBones.ArmatureDisplay); const dragonDisplay = goodjob.getComponent(dragonBones.ArmatureDisplay);
dragonDisplay.playAnimation('newAnimation', 1); dragonDisplay.playAnimation('newAnimation', 1);
playAudio(this.goodjobClip); playAudio(this.goodjobClip, () => {
// this.delayDeleteAnim();
this.changeToMiddleLayer();
callMiddleLayerFunction('PSQS_play_animate_over', null, () => {})
});
// asyncDelay(2); // asyncDelay(2);
// this.showBack(); // this.showBack();
// dragonDisplay.on(dragonBones.EventObject.COMPLETE, (e) => { // dragonDisplay.on(dragonBones.EventObject.COMPLETE, (e) => {
// // this.animPlayEnd();
// }) // })
} }
...@@ -625,13 +635,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -625,13 +635,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
back.scale = 0.3; back.scale = 0.3;
back.opacity = 0 back.opacity = 0
cc.tween(back) cc.tween(back)
.to(0.9, { scale: this._mapScaleMin, opacity: 255 }, { easing: 'elasticOut' }) .to(0.9, {scale: this._mapScaleMin, opacity:255}, {easing: 'elasticOut'})
.start(); .start();
back.addComponent(cc.Button); back.addComponent(cc.Button);
back.on('click', () => { back.on('click', () => {
console.log('click back') console.log('click back')
callMiddleLayerFunction('PSQS_exit_book', null, () => { }); callMiddleLayerFunction('PSQS_exit_book', null, () => {});
}) })
} }
...@@ -646,7 +656,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -646,7 +656,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log(' in animPlayEnd 2') console.log(' in animPlayEnd 2')
// setTimeout(() => { // setTimeout(() => {
callMiddleLayerFunction('PSQS_play_animate_over', null, () => { }) callMiddleLayerFunction('PSQS_play_animate_over', null, () => {})
// }, 100); // }, 100);
// callMiddleLayerFunction('PSQS_play_animate_over', this.animaNode, () => {}) // callMiddleLayerFunction('PSQS_play_animate_over', this.animaNode, () => {})
// }) // })
...@@ -655,12 +665,18 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -655,12 +665,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
changeToMiddleLayer() { changeToMiddleLayer() {
return; // return;
this.cleanListener();
const middleLayer = <any>cc.find("middleLayer"); const middleLayer = <any>cc.find("middleLayer");
if (middleLayer) { if (middleLayer) {
if (!this.animaNode || this.animaNode.parent == middleLayer) {
return;
}
this.cleanListener();
// middleLayer.myAnimNode.parent = middleLayer // middleLayer.myAnimNode.parent = middleLayer
// this.animaNode.updateScale(middleLayer); // this.animaNode.updateScale(middleLayer);
...@@ -675,12 +691,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -675,12 +691,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
this.dragonDisplay.dragonAtlasAsset.addRef();
this.dragonDisplay.dragonAsset.addRef();
// setTimeout(() => { // setTimeout(() => {
console.log('in changeToMiddleLayer 2 '); console.log('in changeToMiddleLayer 2 ');
...@@ -689,37 +699,91 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -689,37 +699,91 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
} }
async setOneAnima1(data, cb) {
if (!data.texPngData) { dragonDisplay;
return animaNode;
maxTexture;
setOneAnima(data, cb) {
console.log(' setOneAnima 1')
// let animaNode = new cc.Node();
// let dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
const middleLayer = <any>cc.find("middleLayer");
// let myAnimNode = middleLayer?.myAnimNode;
let animaNode = middleLayer?.myAnimNode;
let dragonDisplay;
if (!animaNode) {
console.log(' setOneAnima 2')
animaNode = new cc.Node();
dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
const mapMaxScale = this._mapScaleMax;
const data = this.data;
animaNode.updateScale = (oldS, newS) => {
console.log('in updateScale 1');
const cScale = oldS;
const mScale = newS;
animaNode.scale = cScale / mScale * mapMaxScale;
if (data.scale) {
animaNode.scale *= data.scale;
console.log('in updateScale 2');
} }
await asyncLoadDragonBoneAnime(this.canvas, data); }
const animaNode = this.canvas.animaNode;
if (middleLayer) {
console.log(' setOneAnima 3')
middleLayer.myAnimNode = animaNode;
}
} else {
console.log(' setOneAnima 4')
dragonDisplay = animaNode.getComponent(dragonBones.ArmatureDisplay);
console.log('animaNode.animBaseUr: ' + animaNode.animBaseUr );
if (animaNode.animBaseUrl == this.animBaseUrl) {
animaNode.parent = this.canvas;
animaNode.scale = this._mapScaleMax; animaNode.scale = this._mapScaleMax;
if (this.data.scale) { if (this.data.scale) {
animaNode.scale *= this.data.scale; animaNode.scale *= this.data.scale;
} }
const dragonDisplay = animaNode.getComponent(dragonBones.ArmatureDisplay); dragonDisplay.playAnimation(animaNode['animationNames'][0], 1);
dragonDisplay.armatureName = dragonDisplay.getArmatureNames()[0];
const animationName = dragonDisplay.getAnimationNames(dragonDisplay.armatureName)[0];
dragonDisplay.playAnimation(animationName, 1);
dragonDisplay.timeScale = 0; dragonDisplay.timeScale = 0;
dragonDisplay.off(dragonBones.EventObject.FRAME_EVENT) console.log(' setOneAnima 13')
dragonDisplay.on(dragonBones.EventObject.FRAME_EVENT, (event) => {
const frameEventFunc = (e) => {
console.log(' in frameEventFunc ') console.log(' in frameEventFunc ')
if (this.playTimes > 0) { if (this.playTimes > 0) {
this.animChangeStep(event.name); this.animChangeStep(e['name']);
} }
}) };
dragonDisplay.off(dragonBones.EventObject.FRAME_EVENT)
dragonDisplay.on(dragonBones.EventObject.FRAME_EVENT, frameEventFunc)
dragonDisplay.off(dragonBones.EventObject.COMPLETE) console.log(' setOneAnima 14')
dragonDisplay.on(dragonBones.EventObject.COMPLETE, () => {
const compFunc = (e) => {
console.log(' in compFunc ') console.log(' in compFunc ')
if (this.isLast && this.playTimes > 0) { if (this.isLast && this.playTimes > 0) {
...@@ -727,80 +791,41 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -727,80 +791,41 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else { } else {
this.animPlayEnd(); this.animPlayEnd();
} }
}) }
dragonDisplay.off(dragonBones.EventObject.COMPLETE)
dragonDisplay.on(dragonBones.EventObject.COMPLETE, compFunc)
console.log(' setOneAnima 15')
const touchFunc = (e) => {
console.log(' in touchFunc ')
animaNode.off('touchstart')
animaNode.on('touchstart', (e) => {
const pos = e.getLocation(); const pos = e.getLocation();
const x = pos.x// - e.currentTarget.width / 2; const x = pos.x// - e.currentTarget.width / 2;
const y = pos.y// - e.currentTarget.height / 2; const y = pos.y// - e.currentTarget.height / 2;
const newPos = animaNode.convertToNodeSpaceAR(cc.v2(x, y)); const newPos = animaNode.convertToNodeSpaceAR(cc.v2(x, y));
console.log('X: ', Math.round(newPos.x)); console.log('X: ', Math.round( newPos.x ));
console.log('Y: ', Math.round(newPos.y)); console.log('Y: ', Math.round( newPos.y ));
}); }
animaNode.off('touchstart')
animaNode.on('touchstart', touchFunc)
console.log(' setOneAnima 16')
this.dragonDisplay = dragonDisplay; this.dragonDisplay = dragonDisplay;
this.animaNode = animaNode; this.animaNode = animaNode;
cb && cb(); cb && cb();
}
dragonDisplay;
animaNode;
maxTexture;
setOneAnima(data, cb) {
this.setOneAnima1(data, cb);
return; return;
}
}
console.log(' setOneAnima 1') animaNode.parent = this.canvas;
let animaNode = new cc.Node();
let dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
// const middleLayer = <any>cc.find("middleLayer");
// let myAnimNode = middleLayer?.myAnimNode;
// let animaNode ; //= middleLayer?.myAnimNode;
// let dragonDisplay;
// if (!animaNode || true) {
// console.log(' setOneAnima 2')
// animaNode = new cc.Node();
// dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
// const mapMaxScale = this._mapScaleMax;
// const data = this.data;
// animaNode.updateScale = (oldS, newS) => {
// console.log('in updateScale 1');
// const cScale = oldS;
// const mScale = newS;
// animaNode.scale = cScale / mScale * mapMaxScale;
// if (data.scale) {
// animaNode.scale *= data.scale;
// console.log('in updateScale 2');
// }
// }
// if (middleLayer) {
// console.log(' setOneAnima 3')
// middleLayer.myAnimNode = animaNode;
// }
// } else {
// console.log(' setOneAnima 4')
// dragonDisplay = animaNode.getComponent(dragonBones.ArmatureDisplay);
// }
animaNode.parent = this.canvas;
...@@ -816,8 +841,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -816,8 +841,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
// let oldAtlas; let oldAtlas = dragonDisplay.dragonAtlasAsset
// let oldAsset; let oldAsset = dragonDisplay.dragonAsset;
// if (myAnimNode) { // if (myAnimNode) {
// const oldDragonDisplay = myAnimNode.getComponent(dragonBones.ArmatureDisplay) // const oldDragonDisplay = myAnimNode.getComponent(dragonBones.ArmatureDisplay)
// oldAtlas = oldDragonDisplay.dragonAtlasAsset; // oldAtlas = oldDragonDisplay.dragonAtlasAsset;
...@@ -842,10 +867,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -842,10 +867,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log(' setOneAnima 8') console.log(' setOneAnima 8')
animaNode.animBaseUrl = this.animBaseUrl;
// console.log(' jumpData == null '); // console.log(' jumpData == null ');
// this.delayRelease(oldAtlas, oldAsset) this.delayRelease(oldAtlas, oldAsset)
// setTimeout(() => { // setTimeout(() => {
...@@ -867,10 +892,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -867,10 +892,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// }, 2000); // }, 2000);
// this.maxTexture = texture;
// const atlas = new dragonBones.DragonBonesAtlasAsset();
// atlas.atlasJson = atlasJson;
// atlas.texture = texture;
const atlas = new dragonBones.DragonBonesAtlasAsset(); const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = JSON.stringify(atlasJson); atlas.atlasJson = JSON.stringify(atlasJson);
...@@ -883,18 +905,18 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -883,18 +905,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
// console.log(' setOneAnima 10') // console.log(' setOneAnima 10')
// animaNode.removeComponent(dragonBones.ArmatureDisplay) animaNode.removeComponent(dragonBones.ArmatureDisplay)
// dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay); dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
console.log('dragonDisplay = ' + typeof (dragonDisplay)); console.log('dragonDisplay = ' + typeof(dragonDisplay));
dragonDisplay.dragonAtlasAsset = atlas; dragonDisplay.dragonAtlasAsset = atlas;
console.log('汪汪汪 1') console.log('汪汪汪 1')
dragonDisplay.dragonAsset = asset; dragonDisplay.dragonAsset = asset;
console.log('汪汪汪 2') console.log('汪汪汪 2')
console.log('type: ' + typeof (asset.dragonBonesJson)); console.log('type: ' + typeof(asset.dragonBonesJson));
let json = JSON.parse(asset.dragonBonesJson); let json = JSON.parse(asset.dragonBonesJson);
console.log('json: ', json); console.log('json: ', json);
...@@ -996,8 +1018,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -996,8 +1018,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
const y = pos.y// - e.currentTarget.height / 2; const y = pos.y// - e.currentTarget.height / 2;
const newPos = animaNode.convertToNodeSpaceAR(cc.v2(x, y)); const newPos = animaNode.convertToNodeSpaceAR(cc.v2(x, y));
console.log('X: ', Math.round(newPos.x)); console.log('X: ', Math.round( newPos.x ));
console.log('Y: ', Math.round(newPos.y)); console.log('Y: ', Math.round( newPos.y ));
} }
animaNode.off('touchstart') animaNode.off('touchstart')
animaNode.on('touchstart', touchFunc) animaNode.on('touchstart', touchFunc)
...@@ -1019,7 +1041,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1019,7 +1041,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
delayRelease(oldAtlas, oldAsset, delteItem = null) { delayRelease(oldAtlas, oldAsset, delteItem=null) {
setTimeout(() => { setTimeout(() => {
...@@ -1071,7 +1093,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1071,7 +1093,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
getCurTextObj() { getCurTextObj() {
const data = this.textArr[this.textArrIndex]; const data = this.textArr[this.textArrIndex];
if (data) { if (data) {
this.textArrIndex++; this.textArrIndex ++;
} }
return data; return data;
} }
...@@ -1103,18 +1125,18 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1103,18 +1125,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.textLabel.node.opacity = 0; this.textLabel.node.opacity = 0;
this.textLabel.string = `<outline color=white width=4>${textObj.data}</outline>` this.textLabel.string = `<outline color=white width=4>${textObj.data}</outline>`
if (textObj.duration) { if (textObj.duration ) {
this.textLabel.curTween = cc.tween(this.textLabel.node) this.textLabel.curTween = cc.tween(this.textLabel.node)
.to(0.2, { opacity: 255 }, { easing: 'sineOut' }) .to(0.2, {opacity: 255}, {easing: 'sineOut'})
.delay(textObj.duration) .delay(textObj.duration )
.call(() => { .call(() => {
this.curTextObj = null; this.curTextObj = null;
}) })
.to(0.1, { opacity: 0 }) .to(0.1, {opacity: 0})
.start(); .start();
} else { } else {
this.textLabel.curTween = cc.tween(this.textLabel.node) this.textLabel.curTween = cc.tween(this.textLabel.node)
.to(0.2, { opacity: 255 }, { easing: 'sineOut' }) .to(0.2, {opacity: 255}, {easing: 'sineOut'})
.start(); .start();
} }
...@@ -1122,7 +1144,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1122,7 +1144,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
getTextLabel() { getTextLabel() {
const richTextNode = new cc.Node(); const richTextNode = new cc.Node();
richTextNode.y = -this.canvas.height / 2 + 20 * this._mapScaleMin; richTextNode.y = -this.canvas.height / 2 + 20 * this._mapScaleMin ;
richTextNode.opacity = 0; richTextNode.opacity = 0;
richTextNode.anchorY = 0; richTextNode.anchorY = 0;
richTextNode.scale = this._mapScaleMin; richTextNode.scale = this._mapScaleMin;
...@@ -1154,7 +1176,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1154,7 +1176,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
update(dt) { update (dt) {
this.checkShowText(); this.checkShowText();
} }
...@@ -1173,23 +1195,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1173,23 +1195,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
// if (cc.assetManager.cacheManager) { // if (cc.assetManager.cacheManager) {
// cc.assetManager.cacheManager.clearCache() // cc.assetManager.cacheManager.clearCache()
// } // }
} }
onDestroy() { onDestroy() {
console.log(' in onDestroy'); console.log(' in onDestroy');
this.changeToMiddleLayer();
this.releaseAssets(); this.releaseAssets();
this.animaNode.removeFromParent();
setTimeout(() => {
if (this.dragonDisplay) {
this.dragonDisplay.dragonAtlasAsset.texture.destroy();
this.dragonDisplay.dragonAtlasAsset.destroy();
this.dragonDisplay.dragonAsset.destroy();
} else {
console.log('没有 this.dragonDisplay');
}
}, 100);
} }
} }
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "01bc5c21-35e0-4df7-b45c-91e1db6bbc36", "uuid": "e7337c8c-450c-46fb-aeb5-1aa6589c1cfb",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "5b4367d7-2537-43d5-a7a9-fc5f5d405ad7", "uuid": "401ac718-ac5b-4b4e-88c2-84e3e7f79d10",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "d45ef1e1-912a-4371-9361-ab0290acf8af", "uuid": "0396b813-deda-4e71-98eb-4f7b5a97607c",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "c749ea77-e186-4b60-a021-1e831ba379fe", "uuid": "e9c5064b-a25a-43b8-ba33-64c47c70d131",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "1b178e19-5ecd-429a-8dd8-52679bc75984", "uuid": "3893e755-d172-4335-b9e0-ae6aadba3294",
"isPlugin": true, "isPlugin": true,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "4cc23ada-e360-4564-b768-acb660c771c5", "uuid": "38cd9b53-2899-49cc-ba1c-8a9068d1acd8",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "34401cf5-d596-4a35-be37-4376e7031008", "uuid": "c6308b3b-beda-4402-a1e3-cc77e84e09ad",
"isBundle": false, "isBundle": false,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "98d57d91-eae8-4740-8a30-6c3f7ed3311e", "uuid": "b455337b-0e9e-4450-ada2-792d01880695",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"back": { "back": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "21c46819-635d-44f1-8802-24eed947ec47", "uuid": "7970e7a4-3344-4654-869e-7d86525d538f",
"rawTextureUuid": "98d57d91-eae8-4740-8a30-6c3f7ed3311e", "rawTextureUuid": "b455337b-0e9e-4450-ada2-792d01880695",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "601273b3-10f8-4a15-800a-2b9417d13e35", "uuid": "9567fd25-2231-4c00-b3c9-d015ceed71f2",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"black": { "black": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "5da77720-589f-4569-80d9-9b1718a36c81", "uuid": "5b6844fd-84de-4a0b-a953-94fde6c64547",
"rawTextureUuid": "601273b3-10f8-4a15-800a-2b9417d13e35", "rawTextureUuid": "9567fd25-2231-4c00-b3c9-d015ceed71f2",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "1927e1c3-9502-4e94-ad9c-cbe7c6fec162", "uuid": "3ff6bf5a-5ddf-44d8-9e4a-2d8eed711245",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"go_0": { "go_0": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "f14ac956-031f-41f0-8fb4-4b00647c02f7", "uuid": "7c55e90a-88f6-4947-baa2-b9a67ba52f5d",
"rawTextureUuid": "1927e1c3-9502-4e94-ad9c-cbe7c6fec162", "rawTextureUuid": "3ff6bf5a-5ddf-44d8-9e4a-2d8eed711245",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "bee5d541-20f4-4fa6-8c3d-b5f1df589d38", "uuid": "541c12f0-7a8c-4565-b00d-6a475d510006",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"go_1": { "go_1": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "0c4f7341-41d9-4cea-a05d-6777dddb3b86", "uuid": "0a814c8c-7ec2-49fe-84a1-82cb2d97397c",
"rawTextureUuid": "bee5d541-20f4-4fa6-8c3d-b5f1df589d38", "rawTextureUuid": "541c12f0-7a8c-4565-b00d-6a475d510006",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "d3bfcc1a-4426-45f4-b88d-2cb22eb55888", "uuid": "19adb859-2213-4922-bc8f-c5301ec05684",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"go_2": { "go_2": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "236c2bbd-77a1-4f2e-b4c1-7338f549a8d5", "uuid": "c76ff575-367c-4f43-bed2-2673f9bbeb91",
"rawTextureUuid": "d3bfcc1a-4426-45f4-b88d-2cb22eb55888", "rawTextureUuid": "19adb859-2213-4922-bc8f-c5301ec05684",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "77f031b8-d8b6-4894-9dc5-94990c2269b3", "uuid": "4d4ee228-6710-482c-8b37-27d3fd579047",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"go_3": { "go_3": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "9231a078-9119-4563-af21-88c1a2720b6b", "uuid": "f9729f00-7d67-4824-808e-db4f2743b2ad",
"rawTextureUuid": "77f031b8-d8b6-4894-9dc5-94990c2269b3", "rawTextureUuid": "4d4ee228-6710-482c-8b37-27d3fd579047",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "aec153f2-a8d7-440c-a716-e1832c82cfdd", "uuid": "c084885e-3a84-4a14-a24e-267fb24aef7e",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"light": { "light": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "3c775c24-d497-4961-bef3-c07596a41a72", "uuid": "17c172fa-3ad0-4f60-a6b7-a2e8cee68772",
"rawTextureUuid": "aec153f2-a8d7-440c-a716-e1832c82cfdd", "rawTextureUuid": "c084885e-3a84-4a14-a24e-267fb24aef7e",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "5e58a84c-2d04-4d5f-bf57-e1e735a1f75b", "uuid": "2a320afe-8db9-4e15-8811-f914c95b4758",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"start_title": { "start_title": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "5ed3c2b7-e11c-468f-98a4-99264a4377a4", "uuid": "9bc3a9ad-b2e2-4811-b037-148edbc3224e",
"rawTextureUuid": "5e58a84c-2d04-4d5f-bf57-e1e735a1f75b", "rawTextureUuid": "2a320afe-8db9-4e15-8811-f914c95b4758",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"title": "play", "title": "play",
"packageName": "org.cocos2d.demo", "packageName": "org.cocos2d.demo",
"startScene": "9ef4faa1-84f0-4742-95d2-d2eaf214f37d", "startScene": "4a29e4b1-f8b4-4b6a-b305-7d4b475e23a1",
"excludeScenes": [], "excludeScenes": [],
"includeSDKBox": false, "includeSDKBox": false,
"orientation": { "orientation": {
......
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