Commit 8cba0562 authored by asdf's avatar asdf

over

parent ef8179ed
{
"__type__": "cc.AnimationClip",
"_name": "anim_over_girl",
"_objFlags": 0,
"_native": "",
"_duration": 0.45454545454545453,
"sample": 44,
"speed": 0.1,
"wrapMode": 1,
"curveData": {
"paths": {
"dragonbones": {
"props": {
"position": [
{
"frame": 0,
"value": [
468,
-213
],
"motionPath": []
},
{
"frame": 0.09090909090909091,
"value": [
0,
-91
],
"motionPath": [
[
-102,
-3,
-71,
-60,
-122,
34
],
[
-115,
122,
-130,
69,
-79,
202
]
]
},
{
"frame": 0.22727272727272727,
"value": [
0,
204
],
"motionPath": [
[
94,
161,
64,
213,
116,
123
],
[
112,
72,
116,
98,
105,
27
]
]
},
{
"frame": 0.36363636363636365,
"value": [
65,
-6
],
"motionPath": []
},
{
"frame": 0.45454545454545453,
"value": [
468,
-213
],
"motionPath": []
}
]
}
}
}
},
"events": []
}
\ No newline at end of file
{
"ver": "2.1.0",
"uuid": "351743e6-7971-4dc3-96eb-7fa49e1c1a74",
"subMetas": {}
}
\ No newline at end of file
{
"__type__": "cc.AnimationClip",
"_name": "show",
"_objFlags": 0,
"_native": "",
"_duration": 0.08333333333333333,
"sample": 60,
"speed": 0.3,
"wrapMode": 1,
"curveData": {
"paths": {
"bg_verygood": {
"props": {
"scale": [
{
"frame": 0,
"value": {
"__type__": "cc.Vec2",
"x": 0,
"y": 1
}
},
{
"frame": 0.08333333333333333,
"value": {
"__type__": "cc.Vec2",
"x": 1,
"y": 1
}
}
]
}
}
}
},
"events": []
}
\ No newline at end of file
{
"ver": "2.1.0",
"uuid": "71897cb6-4c35-47d0-bee1-fd43d046c3d4",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "b497dc1b-87a4-4c02-8cd4-1391df4635e9",
"downloadMode": 0,
"duration": 4.04898,
"subMetas": {}
}
\ No newline at end of file
...@@ -1332,6 +1332,9 @@ ...@@ -1332,6 +1332,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -2588,6 +2591,9 @@ ...@@ -2588,6 +2591,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -3844,6 +3850,9 @@ ...@@ -3844,6 +3850,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -5100,6 +5109,9 @@ ...@@ -5100,6 +5109,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -6356,6 +6368,9 @@ ...@@ -6356,6 +6368,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
......
...@@ -37,10 +37,13 @@ ...@@ -37,10 +37,13 @@
}, },
{ {
"__id__": 26 "__id__": 26
},
{
"__id__": 27
} }
], ],
"_prefab": { "_prefab": {
"__id__": 27 "__id__": 28
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -112,7 +115,7 @@ ...@@ -112,7 +115,7 @@
"_prefab": { "_prefab": {
"__id__": 6 "__id__": 6
}, },
"_opacity": 134, "_opacity": 0,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 0, "r": 0,
...@@ -285,8 +288,8 @@ ...@@ -285,8 +288,8 @@
0, 0,
0, 0,
1, 1,
1, 0,
1, 0,
1 1
] ]
}, },
...@@ -880,6 +883,9 @@ ...@@ -880,6 +883,9 @@
"audOver": { "audOver": {
"__uuid__": "90b82b64-80fd-47f9-bfb4-5040cb380e10" "__uuid__": "90b82b64-80fd-47f9-bfb4-5040cb380e10"
}, },
"audOver2": {
"__uuid__": "b497dc1b-87a4-4c02-8cd4-1391df4635e9"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -909,6 +915,25 @@ ...@@ -909,6 +915,25 @@
"_originalHeight": 720, "_originalHeight": 720,
"_id": "" "_id": ""
}, },
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "71897cb6-4c35-47d0-bee1-fd43d046c3d4"
},
"_clips": [
{
"__uuid__": "71897cb6-4c35-47d0-bee1-fd43d046c3d4"
}
],
"playOnLoad": true,
"_id": ""
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
......
...@@ -1338,6 +1338,9 @@ ...@@ -1338,6 +1338,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -2594,6 +2597,9 @@ ...@@ -2594,6 +2597,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -3850,6 +3856,9 @@ ...@@ -3850,6 +3856,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -5106,6 +5115,9 @@ ...@@ -5106,6 +5115,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -6362,6 +6374,9 @@ ...@@ -6362,6 +6374,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -7618,6 +7633,9 @@ ...@@ -7618,6 +7633,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
...@@ -8874,6 +8892,9 @@ ...@@ -8874,6 +8892,9 @@
"audTryagain": { "audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": "" "_id": ""
}, },
{ {
......
...@@ -103,6 +103,9 @@ ...@@ -103,6 +103,9 @@
}, },
{ {
"__id__": 67 "__id__": 67
},
{
"__id__": 68
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -192,7 +195,7 @@ ...@@ -192,7 +195,7 @@
"array": [ "array": [
0, 0,
0, 0,
399.2810282722142, 311.7691453623979,
0, 0,
0, 0,
0, 0,
...@@ -1448,7 +1451,7 @@ ...@@ -1448,7 +1451,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 542.42, "width": 0,
"height": 50.4 "height": 50.4
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -3087,9 +3090,6 @@ ...@@ -3087,9 +3090,6 @@
"audTryAgain": { "audTryAgain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1" "__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
}, },
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"pfbItemAnswer": { "pfbItemAnswer": {
"__uuid__": "b125237b-1bc1-4ec8-9b7b-60c16e96c5ae" "__uuid__": "b125237b-1bc1-4ec8-9b7b-60c16e96c5ae"
}, },
...@@ -3117,5 +3117,22 @@ ...@@ -3117,5 +3117,22 @@
} }
], ],
"_id": "76pKAVQpBDVby2iIHB3LLz" "_id": "76pKAVQpBDVby2iIHB3LLz"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_defaultClip": null,
"_clips": [
{
"__uuid__": "351743e6-7971-4dc3-96eb-7fa49e1c1a74"
}
],
"playOnLoad": false,
"_id": "9fJJ8+ou1BCYC9QlAZP68r"
} }
] ]
\ No newline at end of file
...@@ -43,6 +43,12 @@ cc.Class({ ...@@ -43,6 +43,12 @@ cc.Class({
EventMgr.off('showAudioButton', this.showAudioButton, this); EventMgr.off('showAudioButton', this.showAudioButton, this);
}, },
onTouchStart() { onTouchStart() {
if (GameData.audioCount != 0) {
return;
}
if (GameData._showDragonbonesMove) {
return;
}
if (GameData._showDragonbones) { if (GameData._showDragonbones) {
this.playLabelGreen(); this.playLabelGreen();
return; return;
...@@ -50,9 +56,6 @@ cc.Class({ ...@@ -50,9 +56,6 @@ cc.Class({
if (!GameData.startStepDone) { if (!GameData.startStepDone) {
return; return;
} }
if (GameData.audioCount != 0) {
return;
}
if (this.isRight) { if (this.isRight) {
this.chooseRight(); this.chooseRight();
} else { } else {
...@@ -221,6 +224,7 @@ cc.Class({ ...@@ -221,6 +224,7 @@ cc.Class({
), ),
) )
}, },
playLabelGreen() { playLabelGreen() {
this.dragonBone.playAnimation(this.animationName, 1); this.dragonBone.playAnimation(this.animationName, 1);
this.playAudioOption((duration) => { this.playAudioOption((duration) => {
......
...@@ -5,6 +5,7 @@ cc.Class({ ...@@ -5,6 +5,7 @@ cc.Class({
properties: { properties: {
audOver: cc.AudioClip, audOver: cc.AudioClip,
audOver2: cc.AudioClip,
}, },
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS:
...@@ -14,21 +15,24 @@ cc.Class({ ...@@ -14,21 +15,24 @@ cc.Class({
}, },
start() { start() {
showFireworks( this.scheduleOnce(() => {
this.node, showFireworks(
this.node.getChildByName('RibbonNodeBase').children, this.node,
cc.v2(0, -400), cc.v2(0, 1000), 200, 200 this.node.getChildByName('RibbonNodeBase').children,
); cc.v2(0, -400), cc.v2(0, 1000), 200, 200
showFireworks( );
this.node, showFireworks(
this.node.getChildByName('RibbonNodeBase').children, this.node,
cc.v2(-600, -400), cc.v2(200, 1000), 200, 200 this.node.getChildByName('RibbonNodeBase').children,
); cc.v2(-600, -400), cc.v2(200, 1000), 200, 200
showFireworks( );
this.node, showFireworks(
this.node.getChildByName('RibbonNodeBase').children, this.node,
cc.v2(600, -400), cc.v2(-200, 1000), 200, 200 this.node.getChildByName('RibbonNodeBase').children,
); cc.v2(600, -400), cc.v2(-200, 1000), 200, 200
);
this.playAudioOver2();
}, 0.6)
this.playAudioOver(); this.playAudioOver();
}, },
...@@ -39,5 +43,12 @@ cc.Class({ ...@@ -39,5 +43,12 @@ cc.Class({
GameData.audioCount--; GameData.audioCount--;
}) })
}, },
playAudioOver2() {
GameData.audioCount++;
let id = cc.audioEngine.play(this.audOver2, false, 1);
cc.audioEngine.setFinishCallback(id, () => {
GameData.audioCount--;
})
},
// update (dt) {}, // update (dt) {},
}); });
...@@ -9,7 +9,6 @@ cc.Class({ ...@@ -9,7 +9,6 @@ cc.Class({
audEnter: cc.AudioClip, audEnter: cc.AudioClip,
audMove: cc.AudioClip, audMove: cc.AudioClip,
audTryAgain: cc.AudioClip, audTryAgain: cc.AudioClip,
audDown: cc.AudioClip,
pfbItemAnswer: cc.Prefab, pfbItemAnswer: cc.Prefab,
layerOver: cc.Prefab, layerOver: cc.Prefab,
layerTryAgain: cc.Prefab, layerTryAgain: cc.Prefab,
...@@ -46,6 +45,7 @@ cc.Class({ ...@@ -46,6 +45,7 @@ cc.Class({
this.sprAudio.node.active = false; this.sprAudio.node.active = false;
this.startDragonbonePos = this.dragonBone.node.position; this.startDragonbonePos = this.dragonBone.node.position;
this.animation = this.getComponent(cc.Animation);
}, },
onEnable() { onEnable() {
...@@ -149,13 +149,14 @@ cc.Class({ ...@@ -149,13 +149,14 @@ cc.Class({
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this.questionList = []; this.questionList = [];
GameData.audioCount = 0; GameData.audioCount = 0;
this.nodeDict.nodButtons.zIndex = 4; this.nodeDict.nodButtons.zIndex = 6;
let optionList = this.data.questionList[GameData.questionIndex].optionList; let optionList = this.data.questionList[GameData.questionIndex].optionList;
this.optionList = []; this.optionList = [];
for (let i = 0; i < optionList.length; i++) { for (let i = 0; i < optionList.length; i++) {
this.optionList[i] = i; this.optionList[i] = i;
this.questionList[i] = i; this.questionList[i] = i;
} }
// this.questionList[0] = 0;
this.initAnswer(); this.initAnswer();
this.initTitle(); this.initTitle();
this.updateBtnStatus(); this.updateBtnStatus();
...@@ -285,7 +286,9 @@ cc.Class({ ...@@ -285,7 +286,9 @@ cc.Class({
}, },
showDragonBonesMove(target) { showDragonBonesMove(target) {
this.playAudioMove();
GameData._showDragonbones = true; GameData._showDragonbones = true;
GameData._showDragonbonesMove = true;
let pos = target.parent.convertToWorldSpaceAR(target.position); let pos = target.parent.convertToWorldSpaceAR(target.position);
pos = this.node.convertToNodeSpaceAR(pos); pos = this.node.convertToNodeSpaceAR(pos);
pos = pos.add(cc.v2(180, -100)) pos = pos.add(cc.v2(180, -100))
...@@ -314,9 +317,8 @@ cc.Class({ ...@@ -314,9 +317,8 @@ cc.Class({
this.playNormal(); this.playNormal();
this.dragonBone.node.runAction( this.dragonBone.node.runAction(
cc.sequence( cc.sequence(
cc.moveTo(1, this.startDragonbonePos), cc.moveTo(0.5, this.startDragonbonePos),
cc.callFunc(() => { cc.callFunc(() => {
// GameData._showDragonbones = false;
this.dragonBone.node.zIndex = 1; this.dragonBone.node.zIndex = 1;
}) })
) )
...@@ -333,7 +335,7 @@ cc.Class({ ...@@ -333,7 +335,7 @@ cc.Class({
return; return;
} }
itemAnswer.playLabelGreen(); itemAnswer.playLabelGreen();
GameData._showDragonbones = false; GameData._showDragonbonesMove = false;
}) })
)) ))
}, },
...@@ -347,6 +349,25 @@ cc.Class({ ...@@ -347,6 +349,25 @@ cc.Class({
let node = cc.instantiate(this.layerOver); let node = cc.instantiate(this.layerOver);
node.parent = this.node; node.parent = this.node;
node.zIndex = 6; node.zIndex = 6;
this.dragonBone.node.stopAllActions();
this.dragonBone.node.zIndex = 7;
this.animation.play('anim_over_girl');
this.scheduleOnce(()=>{
this.playFinish();
},0.6)
this.scheduleOnce(() => {
node.getChildByName('bg_verygood').runAction(
cc.sequence(
cc.scaleTo(1,0),
cc.callFunc(()=>{
})
)
)
}, 3.5)
}, },
showLayerTryagain() { showLayerTryagain() {
...@@ -369,6 +390,7 @@ cc.Class({ ...@@ -369,6 +390,7 @@ cc.Class({
}, },
resetDate() { resetDate() {
GameData._showDragonbones = false;
this.nodeDict.nodMask.active = false; this.nodeDict.nodMask.active = false;
this.nodeDict.nodMask.parent = this.node; this.nodeDict.nodMask.parent = this.node;
cc.audioEngine.stopAll(); cc.audioEngine.stopAll();
...@@ -389,7 +411,7 @@ cc.Class({ ...@@ -389,7 +411,7 @@ cc.Class({
}, },
buttonListener(button) { buttonListener(button) {
if (GameData._showDragonbones) { if (GameData._showDragonbonesMove) {
return; return;
} }
if (button.node.name == 'btnTitle') { if (button.node.name == 'btnTitle') {
......
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