Commit c8ebe5ab authored by asdf's avatar asdf

.

parent 10f9b281
...@@ -21,14 +21,17 @@ ...@@ -21,14 +21,17 @@
"__id__": 2 "__id__": 2
}, },
{ {
"__id__": 7 "__id__": 6
}, },
{ {
"__id__": 10 "__id__": 9
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 23
},
{ {
"__id__": 24 "__id__": 24
}, },
...@@ -37,13 +40,10 @@ ...@@ -37,13 +40,10 @@
}, },
{ {
"__id__": 26 "__id__": 26
},
{
"__id__": 27
} }
], ],
"_prefab": { "_prefab": {
"__id__": 28 "__id__": 27
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -107,13 +107,10 @@ ...@@ -107,13 +107,10 @@
}, },
{ {
"__id__": 4 "__id__": 4
},
{
"__id__": 5
} }
], ],
"_prefab": { "_prefab": {
"__id__": 6 "__id__": 5
}, },
"_opacity": 0, "_opacity": 0,
"_color": { "_color": {
...@@ -221,16 +218,6 @@ ...@@ -221,16 +218,6 @@
"_originalHeight": 720, "_originalHeight": 720,
"_id": "" "_id": ""
}, },
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": ""
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
...@@ -253,11 +240,11 @@ ...@@ -253,11 +240,11 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 8 "__id__": 7
} }
], ],
"_prefab": { "_prefab": {
"__id__": 9 "__id__": 8
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -311,7 +298,7 @@ ...@@ -311,7 +298,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 7 "__id__": 6
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -358,22 +345,22 @@ ...@@ -358,22 +345,22 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 11 "__id__": 10
}, },
{ {
"__id__": 14 "__id__": 13
}, },
{ {
"__id__": 17 "__id__": 16
}, },
{ {
"__id__": 20 "__id__": 19
} }
], ],
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 23 "__id__": 22
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -427,17 +414,17 @@ ...@@ -427,17 +414,17 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 10 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 12 "__id__": 11
} }
], ],
"_prefab": { "_prefab": {
"__id__": 13 "__id__": 12
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -491,7 +478,7 @@ ...@@ -491,7 +478,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 10
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -534,17 +521,17 @@ ...@@ -534,17 +521,17 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 10 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 15 "__id__": 14
} }
], ],
"_prefab": { "_prefab": {
"__id__": 16 "__id__": 15
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -598,7 +585,7 @@ ...@@ -598,7 +585,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 13
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -641,17 +628,17 @@ ...@@ -641,17 +628,17 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 10 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 18 "__id__": 17
} }
], ],
"_prefab": { "_prefab": {
"__id__": 19 "__id__": 18
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -705,7 +692,7 @@ ...@@ -705,7 +692,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 16
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -748,17 +735,17 @@ ...@@ -748,17 +735,17 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 10 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 21 "__id__": 20
} }
], ],
"_prefab": { "_prefab": {
"__id__": 22 "__id__": 21
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -812,7 +799,7 @@ ...@@ -812,7 +799,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 20 "__id__": 19
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
......
...@@ -250,7 +250,7 @@ cc.Class({ ...@@ -250,7 +250,7 @@ cc.Class({
) )
}, },
playLabelGreen() { playLabelGreen(cb) {
this.dragonBone.playAnimation(this.animationName, 1); this.dragonBone.playAnimation(this.animationName, 1);
this.playAudioOption((duration) => { this.playAudioOption((duration) => {
this.scheduleStep = 2; this.scheduleStep = 2;
...@@ -268,11 +268,11 @@ cc.Class({ ...@@ -268,11 +268,11 @@ cc.Class({
this.labelGreen.node.anchorX = 0; this.labelGreen.node.anchorX = 0;
this.labelGreen.node.x = 0; this.labelGreen.node.x = 0;
this.schedule(this.playLabelGreenCb, this.scheduleDuration) this.schedule(this.playLabelGreenCb, this.scheduleDuration)
}, () => { }, () => {
this.unschedule(this.changeAudioSpfCb) this.unschedule(this.changeAudioSpfCb)
this.sprAudio.spriteFrame = this.spfAudioOn; this.sprAudio.spriteFrame = this.spfAudioOn;
GameData.isAudio = false; GameData.isAudio = false;
cb && cb();
}); });
}, },
playLabelGreenCb() { playLabelGreenCb() {
......
...@@ -352,11 +352,11 @@ cc.Class({ ...@@ -352,11 +352,11 @@ cc.Class({
cc.scaleTo(0.5, 1.2) cc.scaleTo(0.5, 1.2)
), ),
cc.callFunc(() => { cc.callFunc(() => {
itemAnswer.playLabelGreen(()=>{
if (this.checkOver()) { if (this.checkOver()) {
this.showLayerOver(); this.showLayerOver();
return;
} }
itemAnswer.playLabelGreen(); });
GameData._showDragonbonesMove = false; GameData._showDragonbonesMove = false;
}) })
)) ))
...@@ -368,6 +368,7 @@ cc.Class({ ...@@ -368,6 +368,7 @@ cc.Class({
} }
}, },
showLayerOver() { showLayerOver() {
GameData.isOver = true;
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;
...@@ -421,13 +422,22 @@ cc.Class({ ...@@ -421,13 +422,22 @@ cc.Class({
GameData.startStepDone = false; GameData.startStepDone = false;
}, },
onTurnLast() { onTurnLast() {
if(GameData.isOver){
return;
}
GameData.questionIndex--; GameData.questionIndex--;
this.resetDate(); this.resetDate();
}, },
onReplay() { onReplay() {
if(GameData.isOver){
return;
}
this.resetDate(); this.resetDate();
}, },
onTurnNext() { onTurnNext() {
if(GameData.isOver){
return;
}
GameData.questionIndex++; GameData.questionIndex++;
this.resetDate(); this.resetDate();
}, },
...@@ -440,6 +450,9 @@ cc.Class({ ...@@ -440,6 +450,9 @@ cc.Class({
if (GameData.audioCount != 0) { if (GameData.audioCount != 0) {
return; return;
} }
if(GameData.isOver){
return;
}
this.playAudioPage(true); this.playAudioPage(true);
} else if (button.node.name == 'btnLast') { } else if (button.node.name == 'btnLast') {
this.onTurnLast(); this.onTurnLast();
...@@ -448,6 +461,9 @@ cc.Class({ ...@@ -448,6 +461,9 @@ cc.Class({
} else if (button.node.name == 'btnNext') { } else if (button.node.name == 'btnNext') {
this.onTurnNext(); this.onTurnNext();
} else if (button.node.name == 'btnAudio') { } else if (button.node.name == 'btnAudio') {
if(GameData.isOver){
return;
}
this.onBtnClickAudio(); this.onBtnClickAudio();
} }
}, },
......
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