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 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -2588,6 +2591,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -3844,6 +3850,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -5100,6 +5109,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -6356,6 +6368,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......
......@@ -37,10 +37,13 @@
},
{
"__id__": 26
},
{
"__id__": 27
}
],
"_prefab": {
"__id__": 27
"__id__": 28
},
"_opacity": 255,
"_color": {
......@@ -112,7 +115,7 @@
"_prefab": {
"__id__": 6
},
"_opacity": 134,
"_opacity": 0,
"_color": {
"__type__": "cc.Color",
"r": 0,
......@@ -285,8 +288,8 @@
0,
0,
1,
1,
1,
0,
0,
1
]
},
......@@ -880,6 +883,9 @@
"audOver": {
"__uuid__": "90b82b64-80fd-47f9-bfb4-5040cb380e10"
},
"audOver2": {
"__uuid__": "b497dc1b-87a4-4c02-8cd4-1391df4635e9"
},
"_id": ""
},
{
......@@ -909,6 +915,25 @@
"_originalHeight": 720,
"_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",
"root": {
......
......@@ -1338,6 +1338,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -2594,6 +2597,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -3850,6 +3856,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -5106,6 +5115,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -6362,6 +6374,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -7618,6 +7633,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......@@ -8874,6 +8892,9 @@
"audTryagain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"_id": ""
},
{
......
......@@ -103,6 +103,9 @@
},
{
"__id__": 67
},
{
"__id__": 68
}
],
"_prefab": null,
......@@ -192,7 +195,7 @@
"array": [
0,
0,
399.2810282722142,
311.7691453623979,
0,
0,
0,
......@@ -1448,7 +1451,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 542.42,
"width": 0,
"height": 50.4
},
"_anchorPoint": {
......@@ -3087,9 +3090,6 @@
"audTryAgain": {
"__uuid__": "6df9bb96-0611-47b1-9d98-f877972aa7f1"
},
"audDown": {
"__uuid__": "3102823d-0ed3-4985-bc07-2d108298c006"
},
"pfbItemAnswer": {
"__uuid__": "b125237b-1bc1-4ec8-9b7b-60c16e96c5ae"
},
......@@ -3117,5 +3117,22 @@
}
],
"_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({
EventMgr.off('showAudioButton', this.showAudioButton, this);
},
onTouchStart() {
if (GameData.audioCount != 0) {
return;
}
if (GameData._showDragonbonesMove) {
return;
}
if (GameData._showDragonbones) {
this.playLabelGreen();
return;
......@@ -50,9 +56,6 @@ cc.Class({
if (!GameData.startStepDone) {
return;
}
if (GameData.audioCount != 0) {
return;
}
if (this.isRight) {
this.chooseRight();
} else {
......@@ -221,6 +224,7 @@ cc.Class({
),
)
},
playLabelGreen() {
this.dragonBone.playAnimation(this.animationName, 1);
this.playAudioOption((duration) => {
......
......@@ -5,6 +5,7 @@ cc.Class({
properties: {
audOver: cc.AudioClip,
audOver2: cc.AudioClip,
},
// LIFE-CYCLE CALLBACKS:
......@@ -14,6 +15,7 @@ cc.Class({
},
start() {
this.scheduleOnce(() => {
showFireworks(
this.node,
this.node.getChildByName('RibbonNodeBase').children,
......@@ -29,6 +31,8 @@ cc.Class({
this.node.getChildByName('RibbonNodeBase').children,
cc.v2(600, -400), cc.v2(-200, 1000), 200, 200
);
this.playAudioOver2();
}, 0.6)
this.playAudioOver();
},
......@@ -39,5 +43,12 @@ cc.Class({
GameData.audioCount--;
})
},
playAudioOver2() {
GameData.audioCount++;
let id = cc.audioEngine.play(this.audOver2, false, 1);
cc.audioEngine.setFinishCallback(id, () => {
GameData.audioCount--;
})
},
// update (dt) {},
});
......@@ -9,7 +9,6 @@ cc.Class({
audEnter: cc.AudioClip,
audMove: cc.AudioClip,
audTryAgain: cc.AudioClip,
audDown: cc.AudioClip,
pfbItemAnswer: cc.Prefab,
layerOver: cc.Prefab,
layerTryAgain: cc.Prefab,
......@@ -46,6 +45,7 @@ cc.Class({
this.sprAudio.node.active = false;
this.startDragonbonePos = this.dragonBone.node.position;
this.animation = this.getComponent(cc.Animation);
},
onEnable() {
......@@ -149,13 +149,14 @@ cc.Class({
// 所有全局变量 默认都是null
this.questionList = [];
GameData.audioCount = 0;
this.nodeDict.nodButtons.zIndex = 4;
this.nodeDict.nodButtons.zIndex = 6;
let optionList = this.data.questionList[GameData.questionIndex].optionList;
this.optionList = [];
for (let i = 0; i < optionList.length; i++) {
this.optionList[i] = i;
this.questionList[i] = i;
}
// this.questionList[0] = 0;
this.initAnswer();
this.initTitle();
this.updateBtnStatus();
......@@ -285,7 +286,9 @@ cc.Class({
},
showDragonBonesMove(target) {
this.playAudioMove();
GameData._showDragonbones = true;
GameData._showDragonbonesMove = true;
let pos = target.parent.convertToWorldSpaceAR(target.position);
pos = this.node.convertToNodeSpaceAR(pos);
pos = pos.add(cc.v2(180, -100))
......@@ -314,9 +317,8 @@ cc.Class({
this.playNormal();
this.dragonBone.node.runAction(
cc.sequence(
cc.moveTo(1, this.startDragonbonePos),
cc.moveTo(0.5, this.startDragonbonePos),
cc.callFunc(() => {
// GameData._showDragonbones = false;
this.dragonBone.node.zIndex = 1;
})
)
......@@ -333,7 +335,7 @@ cc.Class({
return;
}
itemAnswer.playLabelGreen();
GameData._showDragonbones = false;
GameData._showDragonbonesMove = false;
})
))
},
......@@ -347,6 +349,25 @@ cc.Class({
let node = cc.instantiate(this.layerOver);
node.parent = this.node;
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() {
......@@ -369,6 +390,7 @@ cc.Class({
},
resetDate() {
GameData._showDragonbones = false;
this.nodeDict.nodMask.active = false;
this.nodeDict.nodMask.parent = this.node;
cc.audioEngine.stopAll();
......@@ -389,7 +411,7 @@ cc.Class({
},
buttonListener(button) {
if (GameData._showDragonbones) {
if (GameData._showDragonbonesMove) {
return;
}
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