Commit 23c8609f authored by Chen Jiping's avatar Chen Jiping

fix:增加播放动画显示

parent 4dbcfc45
......@@ -90,13 +90,13 @@
"_active": true,
"_components": [
{
"__id__": 137
"__id__": 139
},
{
"__id__": 138
"__id__": 140
},
{
"__id__": 139
"__id__": 141
}
],
"_prefab": null,
......@@ -186,7 +186,7 @@
"array": [
0,
0,
340.4379931432836,
342.21842439708195,
0,
0,
0,
......@@ -4213,7 +4213,7 @@
"__id__": 91
},
{
"__id__": 126
"__id__": 128
}
],
"_active": false,
......@@ -4577,6 +4577,9 @@
},
{
"__id__": 124
},
{
"__id__": 126
}
],
"_active": true,
......@@ -4991,7 +4994,7 @@
},
{
"__type__": "cc.Node",
"_name": "title_bg",
"_name": "option_board2",
"_objFlags": 0,
"_parent": {
"__id__": 91
......@@ -5012,6 +5015,96 @@
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 190,
"height": 201
},
"_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": "c7wKR3ZYVOyJA6pqW+/dV+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f20c61a5-42f5-4ffc-9da8-95edd7de6ef7"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "8cbOHQheRCurX4QeD66Iwc"
},
{
"__type__": "cc.Node",
"_name": "title_bg",
"_objFlags": 0,
"_parent": {
"__id__": 91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 517,
......@@ -5056,7 +5149,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
"__id__": 102
},
"_enabled": true,
"_materials": [],
......@@ -5090,7 +5183,7 @@
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 105
}
],
"_prefab": null,
......@@ -5146,7 +5239,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 104
},
"_enabled": true,
"_materials": [],
......@@ -5178,7 +5271,7 @@
"_active": true,
"_components": [
{
"__id__": 105
"__id__": 107
}
],
"_prefab": null,
......@@ -5234,7 +5327,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 106
},
"_enabled": true,
"_materials": [],
......@@ -5268,7 +5361,7 @@
"_active": true,
"_components": [
{
"__id__": 107
"__id__": 109
}
],
"_prefab": null,
......@@ -5324,7 +5417,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 108
},
"_enabled": true,
"_materials": [],
......@@ -5358,7 +5451,7 @@
"_active": true,
"_components": [
{
"__id__": 109
"__id__": 111
}
],
"_prefab": null,
......@@ -5414,7 +5507,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 108
"__id__": 110
},
"_enabled": true,
"_materials": [],
......@@ -5448,7 +5541,7 @@
"_active": true,
"_components": [
{
"__id__": 111
"__id__": 113
}
],
"_prefab": null,
......@@ -5504,7 +5597,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
"__id__": 112
},
"_enabled": true,
"_materials": [],
......@@ -5538,7 +5631,7 @@
"_active": true,
"_components": [
{
"__id__": 113
"__id__": 115
}
],
"_prefab": null,
......@@ -5594,7 +5687,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
"__id__": 114
},
"_enabled": true,
"_materials": [],
......@@ -5628,7 +5721,7 @@
"_active": true,
"_components": [
{
"__id__": 115
"__id__": 117
}
],
"_prefab": null,
......@@ -5684,7 +5777,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 114
"__id__": 116
},
"_enabled": true,
"_materials": [
......@@ -5722,7 +5815,7 @@
"_active": true,
"_components": [
{
"__id__": 117
"__id__": 119
}
],
"_prefab": null,
......@@ -5778,7 +5871,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 116
"__id__": 118
},
"_enabled": true,
"_materials": [],
......@@ -5812,7 +5905,7 @@
"_active": true,
"_components": [
{
"__id__": 119
"__id__": 121
}
],
"_prefab": null,
......@@ -5868,7 +5961,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
"__id__": 120
},
"_enabled": true,
"_materials": [],
......@@ -5902,7 +5995,7 @@
"_active": true,
"_components": [
{
"__id__": 121
"__id__": 123
}
],
"_prefab": null,
......@@ -5958,7 +6051,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 120
"__id__": 122
},
"_enabled": true,
"_materials": [],
......@@ -5992,7 +6085,7 @@
"_active": true,
"_components": [
{
"__id__": 123
"__id__": 125
}
],
"_prefab": null,
......@@ -6048,7 +6141,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 122
"__id__": 124
},
"_enabled": true,
"_materials": [],
......@@ -6082,7 +6175,7 @@
"_active": true,
"_components": [
{
"__id__": 125
"__id__": 127
}
],
"_prefab": null,
......@@ -6138,7 +6231,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
"__id__": 126
},
"_enabled": true,
"_materials": [],
......@@ -6169,9 +6262,6 @@
"__id__": 85
},
"_children": [
{
"__id__": 127
},
{
"__id__": 129
},
......@@ -6183,6 +6273,9 @@
},
{
"__id__": 135
},
{
"__id__": 137
}
],
"_active": true,
......@@ -6240,13 +6333,13 @@
"_name": "appear",
"_objFlags": 0,
"_parent": {
"__id__": 126
"__id__": 128
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 128
"__id__": 130
}
],
"_prefab": null,
......@@ -6302,7 +6395,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 127
"__id__": 129
},
"_enabled": true,
"_clip": {
......@@ -6320,13 +6413,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 126
"__id__": 128
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
"__id__": 132
}
],
"_prefab": null,
......@@ -6382,7 +6475,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 131
},
"_enabled": true,
"_clip": {
......@@ -6400,13 +6493,13 @@
"_name": "error",
"_objFlags": 0,
"_parent": {
"__id__": 126
"__id__": 128
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 132
"__id__": 134
}
],
"_prefab": null,
......@@ -6462,7 +6555,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 131
"__id__": 133
},
"_enabled": true,
"_clip": {
......@@ -6480,13 +6573,13 @@
"_name": "good_job",
"_objFlags": 0,
"_parent": {
"__id__": 126
"__id__": 128
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 134
"__id__": 136
}
],
"_prefab": null,
......@@ -6542,7 +6635,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 133
"__id__": 135
},
"_enabled": true,
"_clip": {
......@@ -6560,13 +6653,13 @@
"_name": "try_again",
"_objFlags": 0,
"_parent": {
"__id__": 126
"__id__": 128
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 136
"__id__": 138
}
],
"_prefab": null,
......@@ -6622,7 +6715,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 137
},
"_enabled": true,
"_clip": {
......
......@@ -51,7 +51,7 @@ cc.Class({
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
......@@ -80,7 +80,7 @@ cc.Class({
getDefaultData() {
const dataJson = '{"exercisesArr":[{"answers":[{"isRight":"1","audioUrl":"http://staging-teach.cdn.ireadabc.com/4b763321dd84accbf0060038f2e95d6a.mp3","picUrl":"http://staging-teach.cdn.ireadabc.com/10dab2d49188db958a6a6e6b3ab7b5f5.png"},{"isRight":"0","picUrl":"http://staging-teach.cdn.ireadabc.com/cb6a2f948c3febbb7881e6b6a7417811.png"},{"isRight":"0","picUrl":"http://staging-teach.cdn.ireadabc.com/a886b150e8792d433ced3672f4df7dfb.jpg"}],"frames":[{"picUrl":"http://staging-teach.cdn.ireadabc.com/824c94f5e363c351e24dde9325731ab7.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/95638e0ab356b51f960e800e3fa5aacb.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3d330a49df81ae964a705048f8ea0e0d.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3023da8f58edfa36a0a9c34e68902ef7.png"}],"hotZoneItemArr":[{"index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/00254362880b14c443e533331db4e2bf.png","audio_url":"http://staging-teach.cdn.ireadabc.com/284f8356d7537612833d1d9bf5d76aa8.mp3","itemType":"pic","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":0.9,"imgScale":0.4584450402144772,"mapScale":0.9,"picX":0,"picY":31.614999999999995,"rect":{"x":907.69,"y":-68.27,"width":313.77,"height":313.77}}],"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/d74f4a1fff340bf4cf02101d5bfda7e8.json","name":"女孩_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/66d2f8e8c531a4a8583e5faf2cf35e41.json","name":"女孩_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/546d11d5c1abbe2a0e442fe4816718b7.png","name":"女孩_tex.png"}},{"answers":[{"isRight":"0","audioUrl":"http://staging-teach.cdn.ireadabc.com/66fe3a8fe9cd81ebb0a20b4fb134443f.mp3","picUrl":"http://staging-teach.cdn.ireadabc.com/cb6dfd436c533f44e8e9fdd594458576.png"},{"isRight":"1","audioUrl":"http://staging-teach.cdn.ireadabc.com/5d8c6991fabc4bf37a0055bb37eac8b3.mp3","picUrl":"http://staging-teach.cdn.ireadabc.com/b2b296923e5fd09e77cd29fd3883f78e.png"},{"isRight":"0","picUrl":"http://staging-teach.cdn.ireadabc.com/3fed3a7bacc07dfb84de7196a50d39ab.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/9f9361601b4f2dbd60f037c6996a5af6.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/2f65d31e390318626fce1180bb09b2ea.png"}],"frames":[{"picUrl":"http://staging-teach.cdn.ireadabc.com/25a82fd9d55b026a76d2caaeed754a02.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/25a82fd9d55b026a76d2caaeed754a02.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3d8d02f661a45283aa4eef1b6faed704.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/8c1833c5a38efea3394ad78a44cd8801.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3d8d02f661a45283aa4eef1b6faed704.png"}],"hotZoneItemArr":[{"index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/59a3efbfa3df99100e8810cbcddef107.png","itemType":"pic","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":0.9,"imgScale":0.9447513812154696,"mapScale":0.9,"picX":576.6899999999999,"picY":140.03,"rect":{"x":470.15,"y":33.49,"width":213.08,"height":213.08}}],"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/6db25cc732cb592dd26295aaefdd016a.json","name":"FT01测试_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/9223e48368163e5d2bd556aa869b4610.json","name":"FT01测试_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/f7314ee89b8f27dc6b7cfcd6831ed728.png","name":"FT01测试_tex.png"}}],"bg":{"rect":{"x":0,"y":-57,"width":1152,"height":648},"picUrl":"http://staging-teach.cdn.ireadabc.com/0b6497174aed7ae05127d1eb8c29d94a.jpg"},"title":{"val":"Find Body Part","audioUrl":"http://staging-teach.cdn.ireadabc.com/8f5559c935b390efdea299ad568d3bd9.mp3"}}';
const dataJson = '{"exercisesArr":[{"answers":[{"isRight":"0","audioUrl":"http://staging-teach.cdn.ireadabc.com/afdd23cc154d515a3afff15ccc775502.mp3","picUrl":"http://staging-teach.cdn.ireadabc.com/10dab2d49188db958a6a6e6b3ab7b5f5.png"},{"isRight":"1","picUrl":"http://staging-teach.cdn.ireadabc.com/cb6a2f948c3febbb7881e6b6a7417811.png","audioUrl":"http://staging-teach.cdn.ireadabc.com/b29f241c5c90a7276bfc53252bb6ffa4.mp3"},{"isRight":"0","picUrl":"http://staging-teach.cdn.ireadabc.com/a886b150e8792d433ced3672f4df7dfb.jpg","audioUrl":"http://staging-teach.cdn.ireadabc.com/b44fa51172b19b555fda30717c773027.mp3"}],"frames":[{"picUrl":"http://staging-teach.cdn.ireadabc.com/824c94f5e363c351e24dde9325731ab7.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/95638e0ab356b51f960e800e3fa5aacb.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3d330a49df81ae964a705048f8ea0e0d.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3023da8f58edfa36a0a9c34e68902ef7.png"}],"hotZoneItemArr":[{"index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/00254362880b14c443e533331db4e2bf.png","audio_url":"http://staging-teach.cdn.ireadabc.com/518441578f9d37076d87ef067c70a734.mp3","itemType":"pic","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":0.9,"imgScale":0.4584450402144772,"mapScale":0.9,"picX":0,"picY":58.86499999999998,"rect":{"x":638.69,"y":55.73,"width":313.77,"height":313.77}}],"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/d74f4a1fff340bf4cf02101d5bfda7e8.json","name":"女孩_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/66d2f8e8c531a4a8583e5faf2cf35e41.json","name":"女孩_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/546d11d5c1abbe2a0e442fe4816718b7.png","name":"女孩_tex.png"}},{"answers":[{"isRight":"0","audioUrl":"http://staging-teach.cdn.ireadabc.com/b62600fd1e72b54d1d1c3bc71b7361af.mp3","picUrl":"http://staging-teach.cdn.ireadabc.com/cb6dfd436c533f44e8e9fdd594458576.png"},{"isRight":"1","audioUrl":"http://staging-teach.cdn.ireadabc.com/cc089823e40579aaece0d31e118672ae.mp3","picUrl":"http://staging-teach.cdn.ireadabc.com/b2b296923e5fd09e77cd29fd3883f78e.png"},{"isRight":"0","picUrl":"http://staging-teach.cdn.ireadabc.com/3fed3a7bacc07dfb84de7196a50d39ab.png","audioUrl":"http://staging-teach.cdn.ireadabc.com/919b2c150b41b3306869ebe78ecb70b3.mp3"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/9f9361601b4f2dbd60f037c6996a5af6.png","isRight":"0","audioUrl":"http://staging-teach.cdn.ireadabc.com/a252c069d04f8e04f91b2a1394072f30.mp3"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/2f65d31e390318626fce1180bb09b2ea.png","isRight":"0","audioUrl":"http://staging-teach.cdn.ireadabc.com/8b5ecca5d4509e1b8a7e81e69d8db615.mp3"}],"frames":[{"picUrl":"http://staging-teach.cdn.ireadabc.com/25a82fd9d55b026a76d2caaeed754a02.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/25a82fd9d55b026a76d2caaeed754a02.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3d8d02f661a45283aa4eef1b6faed704.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/8c1833c5a38efea3394ad78a44cd8801.png"},{"picUrl":"http://staging-teach.cdn.ireadabc.com/3d8d02f661a45283aa4eef1b6faed704.png"}],"hotZoneItemArr":[{"index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/59a3efbfa3df99100e8810cbcddef107.png","audio_url":"http://staging-teach.cdn.ireadabc.com/71eb8fcc0895873363840db7bc0c5883.mp3","itemType":"pic","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":0.9,"imgScale":0.9447513812154696,"mapScale":0.9,"picX":691.6899999999999,"picY":97.28000000000002,"rect":{"x":585.15,"y":144.49,"width":213.08,"height":213.08}}],"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/6db25cc732cb592dd26295aaefdd016a.json","name":"FT01测试_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/9223e48368163e5d2bd556aa869b4610.json","name":"FT01测试_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/f7314ee89b8f27dc6b7cfcd6831ed728.png","name":"FT01测试_tex.png"}}],"bg":{"rect":{"x":0,"y":-153.75,"width":1152,"height":841.5},"picUrl":"http://staging-teach.cdn.ireadabc.com/3883964c48ea76d6a08386dfe1bf1204.jpg"},"title":{"val":"Find Body Part","audioUrl":"http://staging-teach.cdn.ireadabc.com/8f5559c935b390efdea299ad568d3bd9.mp3"}}';
const data = JSON.parse(dataJson);
return data;
},
......@@ -140,7 +140,7 @@ cc.Class({
let answers = exercises.answers;
for (let j = 0; j < answers.length; ++j) {
let answer = answers[j];
console.log(answer);
if (answer.audioUrl) {
this._audioResList.push({ url: answer.audioUrl });
}
......@@ -271,7 +271,7 @@ cc.Class({
this.getSpriteFrimeByUrl(this.data.bg.picUrl, (sf) => {
spr.spriteFrame = sf;
bgNode.scale = Math.max(this._frameSize.width / bgNode.width, this._frameSize.height / bgNode.height);
})
}
......@@ -280,8 +280,8 @@ cc.Class({
const titleBgNode = this.getSprNode('bg');
titleBgNode.parent = bgNode;
bgNode.scale = Math.max(this._frameSize.width / bgNode.width, this._frameSize.height / bgNode.height);
}
bgNode.scale = this._mapScaleMax;
},
titleLabel: null,
......@@ -568,18 +568,25 @@ cc.Class({
}
item.blackMask.icon.scale = 0;
if(!item.board2){
const board2 = this.getSprNode('option_board2');
board2.parent = item;
board2.scale = 1.0;
board2.zIndex = 1;
board2.opacity = 0;
item.board2 = board2;
}
if (!item.maskNode) {
let maskNode = new cc.Node(); // new cc.Node();
maskNode.parent = item;
if (item.getChildByName('mask')) {
maskNode = item.getChildByName('mask');
maskNode.scale = 1.0;
maskNode.x = 0;
maskNode.y = 3;
maskNode.zIndex = 2;
const mask = maskNode.getComponent(cc.Mask);
mask.inverted = false;
......@@ -589,6 +596,8 @@ cc.Class({
const maskNode = item.maskNode;
if (item.pic) {
item.pic.removeFromParent();
}
......@@ -596,6 +605,7 @@ cc.Class({
let picMaxW, picMaxH
picMaxW = item.width;
picMaxH = item.height;
spr.node.zIndex = 2;
setSprNodeMaxLen(spr.node, picMaxW, picMaxH);
item.pic = spr.node;
......@@ -681,25 +691,29 @@ cc.Class({
return;
}
const sprNode = this.getSprNode('loudspeaker');
sprNode.parent = item;
sprNode.x = item.width / 2.4;
sprNode.y = item.height / 3.0;
sprNode.zIndex = 2;
sprNode.zIndex = 5;
item.icon = sprNode;
const sprNode2 = this.getSprNode('loudspeaker_playing');
sprNode2.parent = sprNode.parent;
sprNode2.x = sprNode.x;
sprNode2.y = sprNode.y;
sprNode2.zIndex = 6;
sprNode2.opacity = 0;
sprNode.spr2 = sprNode2;
sprNode.addComponent(cc.Button)
sprNode.on('click', () => {
this.showSoundAnima(sprNode);
console.log(item.data);
this.showSoundAnima(sprNode, item);
playAudioByUrl(item.data.audioUrl, () => {
this.stopSoundAnima(sprNode);
});
......@@ -709,8 +723,8 @@ cc.Class({
/**正在播放的音频节点 */
_playingNode: null,
showSoundAnima(iconNode, time = 0.4) {
showSoundAnima(iconNode, item, time = 0.4) {
if (this._playingNode != iconNode && this._playingNode) {
this.stopSoundAnima(this._playingNode);
}
......@@ -720,17 +734,19 @@ cc.Class({
iconNode.isRunAnima = true;
iconNode.spr2.opacity = 255;
iconNode.opacity = 0;
item.board2.opacity = 255;console.log(item.board2);
cc.tween(iconNode)
.delay(time / 2)
.call(() => {
iconNode.spr2.opacity = 0;
iconNode.opacity = 255;
item.board2.opacity = 0;
})
.delay(time / 2)
.call(() => {
if (iconNode.isRunAnima) {
this.showSoundAnima(iconNode);
this.showSoundAnima(iconNode, item);
}
})
.start()
......
{
"ver": "2.3.5",
"uuid": "7ae02098-5a52-4daf-9239-ca33060886c8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 190,
"height": 201,
"platformSettings": {},
"subMetas": {
"option_board2": {
"ver": "1.0.4",
"uuid": "f20c61a5-42f5-4ffc-9da8-95edd7de6ef7",
"rawTextureUuid": "7ae02098-5a52-4daf-9239-ca33060886c8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 190,
"height": 201,
"rawWidth": 190,
"rawHeight": 201,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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