Commit 61fcf900 authored by liujiangnan's avatar liujiangnan

fix:动画不点击问题

parent 6e611ffc
...@@ -5195,8 +5195,8 @@ ...@@ -5195,8 +5195,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-184.812, -172,
-75.64999999999998, -78,
0, 0,
0, 0,
0, 0,
...@@ -5239,7 +5239,7 @@ ...@@ -5239,7 +5239,7 @@
"__uuid__": "b259dd1c-71da-41ed-9db0-f2483fd32ca9" "__uuid__": "b259dd1c-71da-41ed-9db0-f2483fd32ca9"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 2,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5248,7 +5248,7 @@ ...@@ -5248,7 +5248,7 @@
}, },
"_fillStart": 0, "_fillStart": 0,
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": false,
"_atlas": null, "_atlas": null,
"_id": "71Q35/lpJGfpIWDAL1JpR5" "_id": "71Q35/lpJGfpIWDAL1JpR5"
}, },
...@@ -5264,9 +5264,9 @@ ...@@ -5264,9 +5264,9 @@
"_target": null, "_target": null,
"_alignFlags": 36, "_alignFlags": 36,
"_left": 0, "_left": 0,
"_right": 67.812, "_right": 54.999999999999986,
"_top": 0, "_top": 0,
"_bottom": 70.35000000000001, "_bottom": 67.99999999999999,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -5390,8 +5390,8 @@ ...@@ -5390,8 +5390,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-184.765, -172,
-76.595, -78,
0, 0,
0, 0,
0, 0,
...@@ -5434,7 +5434,7 @@ ...@@ -5434,7 +5434,7 @@
"__uuid__": "d08949e3-b952-4753-bb18-89f8f2082a4b" "__uuid__": "d08949e3-b952-4753-bb18-89f8f2082a4b"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 2,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5443,7 +5443,7 @@ ...@@ -5443,7 +5443,7 @@
}, },
"_fillStart": 0, "_fillStart": 0,
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": false,
"_atlas": null, "_atlas": null,
"_id": "3aiPAEMmxDcpWBBfYJCZh1" "_id": "3aiPAEMmxDcpWBBfYJCZh1"
}, },
...@@ -5459,9 +5459,9 @@ ...@@ -5459,9 +5459,9 @@
"_target": null, "_target": null,
"_alignFlags": 36, "_alignFlags": 36,
"_left": 0, "_left": 0,
"_right": 67.76499999999999, "_right": 55,
"_top": 0, "_top": 0,
"_bottom": 69.405, "_bottom": 68,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -5720,6 +5720,33 @@ ...@@ -5720,6 +5720,33 @@
"groupIndex": 0, "groupIndex": 0,
"_id": "a9KVtyd29NT4oPlOqOJ43+" "_id": "a9KVtyd29NT4oPlOqOJ43+"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 120
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 122,
"_top": 0,
"_bottom": 12.5,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "bes+tZyHdG6qkKvHH+Fy2a"
},
{ {
"__type__": "cc.Button", "__type__": "cc.Button",
"_name": "", "_name": "",
...@@ -5786,34 +5813,7 @@ ...@@ -5786,34 +5813,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": null, "_N$target": null,
"_id": "50iGbLbnlIT66omF46hPZ+" "_id": "129sNI/oZPHZUalIPPX6iH"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 120
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 122,
"_top": 0,
"_bottom": 12.5,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "bes+tZyHdG6qkKvHH+Fy2a"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
......
...@@ -149,7 +149,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -149,7 +149,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}); });
const animaNode = btnStart['animaNode']; const animaNode = btnStart['animaNode'];
animaNode.addComponent(cc.Button); animaNode.y = -80;
const db = animaNode.getComponent(dragonBones.ArmatureDisplay); const db = animaNode.getComponent(dragonBones.ArmatureDisplay);
let anis = db.getAnimationNames("armatureName"); let anis = db.getAnimationNames("armatureName");
db.playAnimation(anis[0], 0); db.playAnimation(anis[0], 0);
...@@ -195,11 +195,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -195,11 +195,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
const btnStart = cc.find("btn_start", this.node); const btnStart = cc.find("btn_start", this.node);
const start_ske = btnStart['animaNode']; const start_ske = btnStart['animaNode'];
start_ske.on('click', () => { btnStart.on('click', () => {
if (start_ske['cantClick']) { if (btnStart['cantClick']) {
return; return;
} }
start_ske['cantClick'] = true; btnStart['cantClick'] = true;
this.startNode.active = true; this.startNode.active = true;
cc.tween(start_ske).to(0.2, { scale: 1 }).start(); cc.tween(start_ske).to(0.2, { scale: 1 }).start();
...@@ -211,7 +211,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -211,7 +211,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
const btnStart = cc.find("btn_start", this.node); const btnStart = cc.find("btn_start", this.node);
let start_ske = btnStart['animaNode']; let start_ske = btnStart['animaNode'];
cc.tween(start_ske).to(0.2, { scale: 0.3 }).call(() => { cc.tween(start_ske).to(0.2, { scale: 0.3 }).call(() => {
start_ske['cantClick'] = false; btnStart['cantClick'] = false;
}).start(); }).start();
this.page_view.getComponent(cc.PageView).setCurrentPageIndex(0); this.page_view.getComponent(cc.PageView).setCurrentPageIndex(0);
this.startNode.active = false; this.startNode.active = false;
......
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