Commit d4078dca authored by yu's avatar yu

动画效果

parent b692ace7
...@@ -441,6 +441,7 @@ ...@@ -441,6 +441,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "0fpufyVVpDsJXhdF0nqyQI" "_id": "0fpufyVVpDsJXhdF0nqyQI"
...@@ -521,6 +522,7 @@ ...@@ -521,6 +522,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "51ctdulrJL762YJ+YJsG5h" "_id": "51ctdulrJL762YJ+YJsG5h"
...@@ -601,6 +603,7 @@ ...@@ -601,6 +603,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "bcj8PE5t5C/bvzJrfJKep2" "_id": "bcj8PE5t5C/bvzJrfJKep2"
...@@ -681,6 +684,7 @@ ...@@ -681,6 +684,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "adSvNME1VAJpo+Mcy1CKc4" "_id": "adSvNME1VAJpo+Mcy1CKc4"
...@@ -761,6 +765,7 @@ ...@@ -761,6 +765,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "1dSsu5zCFICLt1HS8K3aX4" "_id": "1dSsu5zCFICLt1HS8K3aX4"
...@@ -841,6 +846,7 @@ ...@@ -841,6 +846,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "3fGa2zmmBPponkVzm+ZTlT" "_id": "3fGa2zmmBPponkVzm+ZTlT"
...@@ -921,6 +927,7 @@ ...@@ -921,6 +927,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "f3C2KOM5tKHaaYHaJOdXk8" "_id": "f3C2KOM5tKHaaYHaJOdXk8"
...@@ -1001,6 +1008,7 @@ ...@@ -1001,6 +1008,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "b8DA79vh9Mbb+bqRvZybPk" "_id": "b8DA79vh9Mbb+bqRvZybPk"
...@@ -1081,6 +1089,7 @@ ...@@ -1081,6 +1089,7 @@
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
"_loop": false, "_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false, "playOnLoad": false,
"preload": false, "preload": false,
"_id": "53anR5Nf9LHa35556rYf8+" "_id": "53anR5Nf9LHa35556rYf8+"
...@@ -2959,7 +2968,6 @@ ...@@ -2959,7 +2968,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "a", "_string": "a",
"_N$string": "a", "_N$string": "a",
"_fontSize": 100, "_fontSize": 100,
...@@ -3020,7 +3028,6 @@ ...@@ -3020,7 +3028,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "apple", "_string": "apple",
"_N$string": "apple", "_N$string": "apple",
"_fontSize": 100, "_fontSize": 100,
...@@ -3353,8 +3360,8 @@ ...@@ -3353,8 +3360,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 49, "width": 100,
"height": 49 "height": 100
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3409,7 +3416,7 @@ ...@@ -3409,7 +3416,7 @@
"__uuid__": "cfe19ca9-98be-4c19-90c9-727f3e0b0b94" "__uuid__": "cfe19ca9-98be-4c19-90c9-727f3e0b0b94"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3451,8 +3458,8 @@ ...@@ -3451,8 +3458,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 220, "width": 440,
"height": 124 "height": 248
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3532,8 +3539,8 @@ ...@@ -3532,8 +3539,8 @@
0, 0,
0, 0,
1, 1,
1, 2,
1, 2,
1 1
] ]
}, },
...@@ -3565,7 +3572,6 @@ ...@@ -3565,7 +3572,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "a", "_string": "a",
"_N$string": "a", "_N$string": "a",
"_fontSize": 100, "_fontSize": 100,
...@@ -3605,7 +3611,7 @@ ...@@ -3605,7 +3611,7 @@
"__uuid__": "0a3bdb9a-cde0-4c7d-ba1b-9e4e2d4d77ba" "__uuid__": "0a3bdb9a-cde0-4c7d-ba1b-9e4e2d4d77ba"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3647,8 +3653,8 @@ ...@@ -3647,8 +3653,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 277, "width": 554,
"height": 124 "height": 248
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3728,8 +3734,8 @@ ...@@ -3728,8 +3734,8 @@
0, 0,
0, 0,
1, 1,
1, 2,
1, 2,
1 1
] ]
}, },
...@@ -3761,7 +3767,6 @@ ...@@ -3761,7 +3767,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "a", "_string": "a",
"_N$string": "a", "_N$string": "a",
"_fontSize": 100, "_fontSize": 100,
...@@ -3801,7 +3806,7 @@ ...@@ -3801,7 +3806,7 @@
"__uuid__": "4484df43-f358-4ba3-bb4c-7da0f2cbf61d" "__uuid__": "4484df43-f358-4ba3-bb4c-7da0f2cbf61d"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3858,8 +3863,8 @@ ...@@ -3858,8 +3863,8 @@
0, 0,
0, 0,
1, 1,
1, 2,
1, 2,
1 1
] ]
}, },
...@@ -3891,7 +3896,6 @@ ...@@ -3891,7 +3896,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "", "_string": "",
"_N$string": "", "_N$string": "",
"_fontSize": 100, "_fontSize": 100,
...@@ -3959,8 +3963,8 @@ ...@@ -3959,8 +3963,8 @@
0, 0,
0, 0,
1, 1,
2, 1,
2, 1,
1 1
] ]
}, },
...@@ -4109,7 +4113,7 @@ ...@@ -4109,7 +4113,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 428, "width": 428,
"height": 124 "height": 250
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -4127,8 +4131,8 @@ ...@@ -4127,8 +4131,8 @@
0, 0,
0, 0,
1, 1,
2, 1,
2, 1,
1 1
] ]
}, },
...@@ -4156,7 +4160,7 @@ ...@@ -4156,7 +4160,7 @@
"_layoutSize": { "_layoutSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 428, "width": 428,
"height": 124 "height": 250
}, },
"_resize": 1, "_resize": 1,
"_N$layoutType": 1, "_N$layoutType": 1,
...@@ -4263,8 +4267,8 @@ ...@@ -4263,8 +4267,8 @@
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "4d51a805-5c5d-42f9-9e4c-1410dc4014a3" "__uuid__": "4d51a805-5c5d-42f9-9e4c-1410dc4014a3"
}, },
"_type": 0, "_type": 1,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -4306,8 +4310,8 @@ ...@@ -4306,8 +4310,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 124, "width": 248,
"height": 124 "height": 248
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -4387,8 +4391,8 @@ ...@@ -4387,8 +4391,8 @@
0, 0,
0, 0,
1, 1,
1, 2,
1, 2,
1 1
] ]
}, },
...@@ -4420,7 +4424,6 @@ ...@@ -4420,7 +4424,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "a", "_string": "a",
"_N$string": "a", "_N$string": "a",
"_fontSize": 100, "_fontSize": 100,
...@@ -4460,7 +4463,7 @@ ...@@ -4460,7 +4463,7 @@
"__uuid__": "48f2aabb-d6f5-4008-b809-7e16b10101f3" "__uuid__": "48f2aabb-d6f5-4008-b809-7e16b10101f3"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -7521,7 +7524,6 @@ ...@@ -7521,7 +7524,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "", "_string": "",
"_N$string": "", "_N$string": "",
"_fontSize": 27, "_fontSize": 27,
...@@ -9295,7 +9297,6 @@ ...@@ -9295,7 +9297,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "animal1", "_string": "animal1",
"_N$string": "animal1", "_N$string": "animal1",
"_fontSize": 36, "_fontSize": 36,
...@@ -9661,7 +9662,6 @@ ...@@ -9661,7 +9662,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "plant", "_string": "plant",
"_N$string": "plant", "_N$string": "plant",
"_fontSize": 36, "_fontSize": 36,
...@@ -10024,7 +10024,6 @@ ...@@ -10024,7 +10024,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "food", "_string": "food",
"_N$string": "food", "_N$string": "food",
"_fontSize": 36, "_fontSize": 36,
...@@ -10604,7 +10603,6 @@ ...@@ -10604,7 +10603,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "Compare", "_string": "Compare",
"_N$string": "Compare", "_N$string": "Compare",
"_fontSize": 28, "_fontSize": 28,
...@@ -11193,7 +11191,6 @@ ...@@ -11193,7 +11191,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "test", "_string": "test",
"_N$string": "test", "_N$string": "test",
"_fontSize": 35, "_fontSize": 35,
...@@ -11357,7 +11354,6 @@ ...@@ -11357,7 +11354,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "rerg", "_string": "rerg",
"_N$string": "rerg", "_N$string": "rerg",
"_fontSize": 35, "_fontSize": 35,
...@@ -11556,7 +11552,6 @@ ...@@ -11556,7 +11552,6 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "rerg", "_string": "rerg",
"_N$string": "rerg", "_N$string": "rerg",
"_fontSize": 30, "_fontSize": 30,
......
{ {
"ver": "1.2.8", "ver": "1.2.9",
"uuid": "e9759136-33bc-45ff-be96-695974b7f179", "uuid": "e9759136-33bc-45ff-be96-695974b7f179",
"asyncLoadAssets": false, "asyncLoadAssets": false,
"autoReleaseAssets": true, "autoReleaseAssets": true,
......
...@@ -570,12 +570,14 @@ cc.Class({ ...@@ -570,12 +570,14 @@ cc.Class({
pg.audio.playAudioByUrlCall(this._stageData.sound).then((id) => { pg.audio.playAudioByUrlCall(this._stageData.sound).then((id) => {
audioFinished = true; audioFinished = true;
let time = cc.audioEngine.getDuration(id); let time = cc.audioEngine.getDuration(id);
this.showSliderAction(time).then(() => { this.showCardAction(time + 1).then(() => {
this.showSliderAction(1).then(() => {
if (aniFinished && audioFinished) { if (aniFinished && audioFinished) {
this._playing = false; this._playing = false;
resolve(''); resolve('');
} }
}); });
});
}) })
} else { } else {
this._timeoutIds.push(setTimeout(() => { this._timeoutIds.push(setTimeout(() => {
...@@ -594,14 +596,16 @@ cc.Class({ ...@@ -594,14 +596,16 @@ cc.Class({
pg.audio.playAudioByUrlCall(this._stageData.sound).then((id) => { pg.audio.playAudioByUrlCall(this._stageData.sound).then((id) => {
audioFinished = true; audioFinished = true;
let time = cc.audioEngine.getDuration(id); let time = cc.audioEngine.getDuration(id);
this.showSliderAction(time).then(() => { this.showCardAction(time + 1).then(() => {
this.showSliderAction(1).then(() => {
if (aniFinished && audioFinished) { if (aniFinished && audioFinished) {
this._playing = false; this._playing = false;
resolve(''); resolve('');
} }
}); });
});
}) })
}, 1000 * 2)); }, 1000));
} }
}); });
}, },
...@@ -696,7 +700,7 @@ cc.Class({ ...@@ -696,7 +700,7 @@ cc.Class({
slider.action = true; slider.action = true;
layout_card.removeAllChildren(); layout_card.removeAllChildren();
normal_label.removeAllChildren(); normal_label.removeAllChildren();
layout_card.opacity = 255; layout_card.opacity = 1;
layout_normal.opacity = 0; layout_normal.opacity = 0;
let r = [239, 0, 135]; let r = [239, 0, 135];
let l = [2, 171, 241]; let l = [2, 171, 241];
...@@ -731,11 +735,37 @@ cc.Class({ ...@@ -731,11 +735,37 @@ cc.Class({
laebl.active = true; laebl.active = true;
} }
}) })
layout_card.getComponent(cc.Layout).updateLayout();
setTimeout(() => { setTimeout(() => {
card_bg2.width = layout_card.width; let size = this.node.width;
let lWidth = layout_card.width;
if (lWidth > size - 300) {
layout_card.scale = size / lWidth - 0.05;
}
layout_card.opacity = 255;
// card_bg2.width = layout_ca
}, 60); }, 60);
}, },
showCardAction(time) {
return new Promise(async (resolve, reject) => {
let layout_card = cc.find("card_group/layout_card", this.node);
let len = layout_card.children.length
let content = this._stageData.word;
let t = time / content.length;
for (let i = 0; i < len; i++) {
let card = layout_card.children[i];
if (card.name == "add") continue;
await this.cardAction(card, t);
}
return resolve("")
});
},
cardAction(card, time) {
return new Promise((resolve, reject) => {
cc.tween(card).to(time / 2, { scale: 1.1 }).to(time / 2, { scale: 1 }).call(() => { return resolve("") }).start();
});
},
showSliderAction(time) { showSliderAction(time) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let card_group = cc.find("card_group", this.node); let card_group = cc.find("card_group", this.node);
......
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