Commit c8ebe5ab authored by asdf's avatar asdf

.

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