Commit bb4d34b6 authored by Tt's avatar Tt

动画bug修复

parent 5cd6008f
...@@ -108,6 +108,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -108,6 +108,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc.tween(img_door_left).to(1.6, { x: -1000 }).call(() => { cc.tween(img_door_left).to(1.6, { x: -1000 }).call(() => {
this.img_left.active = false; this.img_left.active = false;
this.img_right.active = false; this.img_right.active = false;
this.layout_target.children.forEach(nd => {
nd.opacity = 255
})
}).start(); }).start();
cc.tween(img_door_right).to(1.6, { x: 1000 }).start(); cc.tween(img_door_right).to(1.6, { x: 1000 }).start();
} }
...@@ -126,6 +130,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -126,6 +130,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.x = ar.pos.x; node.x = ar.pos.x;
node.y = ar.pos.y node.y = ar.pos.y
node.data = ar; node.data = ar;
node.opacity = 0;
node.removeComponent(cc.Sprite); node.removeComponent(cc.Sprite);
this.layout_target.addChild(node) this.layout_target.addChild(node)
console.log(node.x, node.y) console.log(node.x, node.y)
......
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