Commit c6c9e97a authored by Vũ Gia Vương's avatar Vũ Gia Vương

fix delay fragment drop

parent 9041bc81
......@@ -80,8 +80,8 @@ export default class BreakingJarController extends cc.Component {
cc.tween(this.hammerNode)
.to(0.5, { position: cc.v3(newPos.x, newPos.y, 0) })
.delay(0.3)
.to(0.3, { position: cc.v3(400, -400) })
.delay(0.1)
.to(0.2, { position: cc.v3(400, -400) })
.call(() => this.hammerNode.active = false)
.start();
}
......
......@@ -79,13 +79,13 @@ export default class FragmentJarController extends cc.Component {
private dropFragment() {
this._isDropped = true;
const pos = this.node.position;
this.node.setSiblingIndex(-1);
eventTarget.emit(CHECK_FRAGMENT, this.node);
cc.tween(this.node)
.delay(0.5)
.call(() => {
eventTarget.emit(PLAY_DROP_SOUND);
this.node.setSiblingIndex(-1);
})
.to(0.1, { scale: 0.9 })
.to(0.1, { scale: 1.05 })
......
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