Commit d4078dca authored by yu's avatar yu

动画效果

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