Commit dda96c61 authored by asdf's avatar asdf

.

parent effdea78
......@@ -30,23 +30,20 @@
"__id__": 11
},
{
"__id__": 14
},
{
"__id__": 22
"__id__": 19
},
{
"__id__": 30
"__id__": 27
}
],
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 30
}
],
"_prefab": {
"__id__": 34
"__id__": 31
},
"_opacity": 255,
"_color": {
......@@ -420,115 +417,6 @@
"fileId": "7e7QXH+hRGSYXPuwKnxQIb",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": {
"__id__": 13
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-17.629,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f9d2b752-95ca-42ec-933f-4440d94f83d3"
},
"fileId": "ffC1AHutlCY58pBBffzzg1",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "qipao1",
......@@ -538,16 +426,16 @@
},
"_children": [
{
"__id__": 15
"__id__": 12
},
{
"__id__": 18
"__id__": 15
}
],
"_active": false,
"_components": [],
"_prefab": {
"__id__": 21
"__id__": 18
},
"_opacity": 255,
"_color": {
......@@ -601,17 +489,17 @@
"_name": "bg_qipao1",
"_objFlags": 0,
"_parent": {
"__id__": 14
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 16
"__id__": 13
}
],
"_prefab": {
"__id__": 17
"__id__": 14
},
"_opacity": 255,
"_color": {
......@@ -665,7 +553,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
"__id__": 12
},
"_enabled": true,
"_materials": [
......@@ -708,17 +596,17 @@
"_name": "labQuestion1",
"_objFlags": 0,
"_parent": {
"__id__": 14
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
"__id__": 16
}
],
"_prefab": {
"__id__": 20
"__id__": 17
},
"_opacity": 255,
"_color": {
......@@ -772,7 +660,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
"__id__": 15
},
"_enabled": true,
"_materials": [
......@@ -834,16 +722,16 @@
},
"_children": [
{
"__id__": 23
"__id__": 20
},
{
"__id__": 26
"__id__": 23
}
],
"_active": false,
"_components": [],
"_prefab": {
"__id__": 29
"__id__": 26
},
"_opacity": 255,
"_color": {
......@@ -897,17 +785,17 @@
"_name": "bg_qipao2",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 19
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 21
}
],
"_prefab": {
"__id__": 25
"__id__": 22
},
"_opacity": 255,
"_color": {
......@@ -961,7 +849,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 20
},
"_enabled": true,
"_materials": [
......@@ -1004,17 +892,17 @@
"_name": "labQuestion2",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 19
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 27
"__id__": 24
}
],
"_prefab": {
"__id__": 28
"__id__": 25
},
"_opacity": 255,
"_color": {
......@@ -1068,7 +956,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 26
"__id__": 23
},
"_enabled": true,
"_materials": [
......@@ -1132,11 +1020,11 @@
"_active": false,
"_components": [
{
"__id__": 31
"__id__": 28
}
],
"_prefab": {
"__id__": 32
"__id__": 29
},
"_opacity": 255,
"_color": {
......@@ -1190,7 +1078,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 27
},
"_enabled": true,
"_materials": [
......@@ -1249,17 +1137,14 @@
"dragonBone": {
"__id__": 9
},
"labText": {
"__id__": 12
},
"labQuestion1": {
"__id__": 19
"__id__": 16
},
"labQuestion2": {
"__id__": 27
"__id__": 24
},
"labQuestion3": {
"__id__": 31
"__id__": 28
},
"_id": ""
},
......
......@@ -24,6 +24,9 @@ cc.Class({
this.node.off('touchstart', this.onTouchStart, this);
},
onTouchStart() {
if (GameData.isMoving) {
return;
}
if (GameData.isAudio) {
return;
}
......
......@@ -5,7 +5,6 @@ cc.Class({
nodBg1: cc.Node,
nodBg2: cc.Node,
dragonBone: dragonBones.ArmatureDisplay,
labText: cc.Label,
labQuestion1: cc.Label,
labQuestion2: cc.Label,
labQuestion3: cc.Label,
......@@ -27,7 +26,6 @@ cc.Class({
this.scene = scene;
this.data = data;
this.index = index;
this.labText.string = index;
this.updateLabels();
this.loadDragonBone();
},
......@@ -138,6 +136,9 @@ cc.Class({
},
onTouchStart() {
if (GameData.isMoving) {
return;
}
if (this.isRight) {
return;
}
......
......@@ -206,7 +206,7 @@ cc.Class({
let id = cc.audioEngine.play(clip, false, 1);
cc.audioEngine.setFinishCallback(id, () => {
GameData.isAudio = false;
if(!isBtn){
if (!isBtn) {
this.showRandomQuestion();
}
})
......@@ -265,6 +265,7 @@ cc.Class({
},
moveToQuestion(ItemAnswer) {
GameData.isMoving = true;
let index = ItemAnswer.index;
let question = this.nodeDict.nodQuestionParent.children[index];
let pos = this.nodeDict.nodQuestionParent.convertToWorldSpaceAR(question.position);
......@@ -282,6 +283,7 @@ cc.Class({
.call(() => {
question.getComponent('ItemQuestion').stopRightAnimation();
this.getComponent(cc.Animation).play('animDark');
GameData.isMoving = false;
})
.start()
})
......@@ -291,12 +293,12 @@ cc.Class({
updateBtnStatus() {
if (GameData.questionIndex == 0) {
this.nodeDict.btnLast.getComponent(cc.Button).interactable = false;
} else{
} else {
this.nodeDict.btnLast.getComponent(cc.Button).interactable = true;
}
if (GameData.questionIndex == this.data.questionList.length - 1) {
this.nodeDict.btnNext.getComponent(cc.Button).interactable = false;
}else{
} else {
this.nodeDict.btnNext.getComponent(cc.Button).interactable = true;
}
},
......
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