Commit 878a08e4 authored by Tt's avatar Tt

修改跳出和点击bug

parent 8424e16d
......@@ -174,6 +174,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
layer_paopao.addChild(item)
this.updatePaoPao(item, data, pos, i);
}
pg.hw.playLocalAudio('fly')
this.scheduleOnce(() => {
this.canTouch = true;
}, 2)
......@@ -217,7 +218,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
item.y = pos.y - 1000
let time = i == 1 ? 1.3 : i == 2 ? 1.6 : 2;//
cc.tween(item)
.to(time, { y: pos.y })
.to(time / 3, { y: pos.y })
.call(() => {
this.repeatFly(item)
}).start();
......@@ -226,9 +227,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc.tween(item)
.repeatForever(
cc.tween()
.call(() => {
pg.hw.playLocalAudio('fly')
})
.to(0.5, { scaleY: 1.1, y: 60 })
.to(0.5, { scaleY: 1, y: 0 })
.delay(0.7)
......@@ -240,6 +238,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 点击泡泡
touchPaoPao(e: any) {
if (!this.canTouch) return;
this.canTouch = false;
// 如果泡泡没有到指定位置不允许点击
let item = e.target;
let data = e.target.data;
......@@ -263,11 +262,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
let children = layer_paopao.children;
children.forEach((node, i) => {
if (this.rightList.some(dt => node.data.id == dt.id)) return;
cc.Tween.stopAllByTarget(node);
cc.tween(node).by(0.5 + (i / children.length) * 0.5, { y: -1500 }).start();
})
}
this.scheduleOnce(() => {
item.parent = null;
this.canTouch = true;
if (this.rightList.length == this.currentRightList.length) {
cc.Tween.stopAll();
this.startCreate = false;
......@@ -286,6 +287,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.visible(bubble, true)
pg.view.visible(broken, false)
this.repeatFly(item);
this.canTouch = 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